
7 Sep
2006
7 Sep
'06
1:49 a.m.
What is the practical meaning of monad laws? (M, return, >>=) is not qualified as a category-theoretical monad, if the following laws are not satisfied: 1. (return x) >>= f == f x 2. m >>= return == m 3. (m >>= f) >>= g == m >> (\x -> f x >>= g) But what practical problems can unsatisfying them cause? In other words, I wonder if declaring a instance of the Monad class but not checking it for monad laws may cause any problems, except for not being qualified as a theoretical monad? Cheers, -- Deokhwan Kim