Re: pattern guards + monads

1997-05-15 Thread Malcolm Wallace
I am having a little trouble following the two discussions on pattern guards and monads, due to some (probably minor) confusing pieces of syntax. Would anyone like to clarify these for me? It would help me to understand the underlying issues. Thanks. On pattern guards, Simon PJ writes:

Re: pattern guards + monads

1997-05-15 Thread Philip Wadler
Now, for monads, Phil Wadler writes a law: m = \x - k x ++ h x = m = k ++ n = k in which 'h' appears on the lhs but not the rhs, and 'n' on the rhs but not the lhs. ... perhaps the equation should read as follows? m = \x - k x ++ h x = m = k ++ m = h Yes, of course it