what laws should hold for the (++) operation?
the haskell report says:
zero ++ m = m = m ++ zero
i'd additionally expected something like
join x ++ join y = join (x ++ y)
but this might be too restrictive,
since it forces the monad to be a list monad?
for instance (sic), it fails for
instance MonadPlus Maybe where
Nothing ++ ys = ys
xs ++ ys = xs
since
join (Just Nothing) ++ join (Just (Just X))
= Nothing ++ Just X = Just X
join (Just Nothing ++ Just (Just X))
= join (Just Nothing) = Nothing
short and quick answers preferred, as i'll be giving
a talk on monads this afternoon ...
--
Johannes Waldmann Institut fur Informatik Universitat Leipzig
[EMAIL PROTECTED] http://www.informatik.uni-leipzig.de/~joe/
PF 920, D-04009 Leipzig, Germany Tel/Fax (+49) 341 97 32204 / 32209