[Haskell-cafe] Alternative name for return
j.stutterheim at me.com
Tue Aug 6 10:03:04 CEST 2013
I have to admit that I am a bit torn about using `pure`. On the one hand, if you actually have a pure value, it feels pretty intuitive to me. But what about
pure (putStrLn "Hi")
`putStrLn "Hi"` is not a pure value... Or is there another way to interpret the word pure in this context?
As for Applicative, I can add (and have added) the Applicative constraint in the Monad definition for my project, so I will also have to write an Applicative instance for my monads.
On 6 Aug 2013, at 09:50, Erik Hesselink <hesselink at gmail.com> wrote:
> What about `pure`? It's already used in applicative, and has the
> motivation that it's embedding a pure value in some context. Since I
> don't know the details of your project, I don't know if you need two
> names (one for the applicative version, and one for the monadic
> On Tue, Aug 6, 2013 at 7:14 AM, J. Stutterheim <j.stutterheim at me.com> wrote:
>> Dear Cafe,
>> Suppose we now have the opportunity to change the name of the `return` function in Monad, what would be a "better" name for it? (for some definition of better)
>> N.B. I am _not_ proposing that we actually change the name of `return`. I do currently have the opportunity to pick names for common functions in a non-Haskell related project, so I was wondering if there perhaps is a better name for `return`.
>> - Jurriën
>> Haskell-Cafe mailing list
>> Haskell-Cafe at haskell.org
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 495 bytes
Desc: Message signed with OpenPGP using GPGMail
More information about the Haskell-Cafe