AW: Newbie qustion about monads

2003-10-02 Thread Markus . Schnell
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

Re: AW: Newbie qustion about monads

2003-10-02 Thread Juanma Barranquero
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

Re: AW: Newbie qustion about monads

2003-10-02 Thread Marcin 'Qrczak' Kowalczyk
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.