[Haskell-beginners] pure instead of return?
Francesco Ariis
fa-ml at ariis.it
Sat Jul 1 18:03:30 UTC 2017
On Sat, Jul 01, 2017 at 07:47:57PM +0200, Silent Leaf wrote:
> [..] or is it a way to say "simplest way to wrap
> the value, purest (least "modified") equivalent of the value as wrapped
> value"?
^-- this one.
`pure` and `return` are synonyms. There are two words for the same concept
for historical reasons. Using pure does not incurs in monad constraints,
so if you can you might want to use that.
More information about the Beginners
mailing list