[Haskell-beginners] Monad for Pair
ky3 at atamo.com
Wed Nov 18 07:23:37 UTC 2015
On Wed, Nov 18, 2015 at 4:41 AM, Mike Houghton <mike_k_houghton at yahoo.co.uk>
And really return x = P (x, x) doesn’t seem correct anyway.
But if you look at the type, which is essentially "a -> (a,a)" there's only
one way to write it, for the same reason that there's only one "a -> a"
Would someone please write the Monad with an explanation?
Much better if you let us know the source of this problem. Is this an
exercise from some book / online course?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Beginners