G'day all.
Quoting askyle <[EMAIL PROTECTED]>:
Yup: bind f = f <=< id -- whence you can say (>>=) = flip bind
Ah, yes.
My point is that (as far as I can see) you cannot prove the properties of
bind by only assuming identity and associativity for (<=<).
One thing that may help is that if you can prove that fmap is sane:
fmap (f . g) = fmap f . fmap g
then the naturality of return is precisely its free theorem, and ditto
for bind.
So perhaps this law:
(f <=< g) . h === f <=< (g . h)
is actually the fmap law in disguise?
Cheers,
Andrew Bromage
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe