> 2) One possibility is just have it being (Node x _ _) >>= f = f x
> 

It does not follow monad laws (right identity to be more precise):

(Node 1 (Node 2 Empty Empty) Empty) >>= return ≡
return 1 ≡
Node 1 Empty Empty
≠
(Node 1 (Node 2 Empty Empty) Empty)

Regards

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to