I'm not trying to create useful monads (I'm pretty sure they
aren't :),
but understanding the concepts. So, the question remains:
when the monad
laws say that
(return x) = f == f x
The Monad class is just called Monad because it is intended
to cover a monad. But it doesn't ensure the
On Thu, 2 Oct 2003 13:16:13 +0200
[EMAIL PROTECTED] wrote:
The Monad class is just called Monad because it is intended
to cover a monad. But it doesn't ensure the laws. That is your
sole responsibility.
Yeah, I know. But it's difficult to ensure I'm satisfying the laws when
I'm not entirely
W licie z czw, 02-10-2003, godz. 14:25, Juanma Barranquero pisze:
Yeah, I know. But it's difficult to ensure I'm satisfying the laws when
I'm not entirely sure what do they ask from me...
1. (return x) = f == f x
2. m = return == m
3. (m = f) = g == m = (\x - f x = g)
My intuition:
1 2.