[Haskell-beginners] can I use "pure" all the time instead of "return" now?

Alex Belanger i.caught.air at gmail.com
Mon May 16 14:25:14 UTC 2016


Correct, you're stuck always writing it with the parenthese because without
them; you get an infix function which is binary, not unary.

I still don't see what your solution brings new to the table in relevance
to the question. It's just trading a poorly named function for arguably an
even worse.
On May 16, 2016 10:20 AM, "Imants Cekusins" <imantc at gmail.com> wrote:

> > Alex
>
> here  is what I tried:
>
> (%%):: Applicative f => a -> f a
> (%%) = pure
>
>
> test::Int -> IO Int
> test i0 = (%%) $ i0 + (2::Int)
>
>
> seems to work..
>
> I can't get %% to work without ()
>
> _______________________________________________
> Beginners mailing list
> Beginners at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/beginners/attachments/20160516/1d60d029/attachment.html>


More information about the Beginners mailing list