[Haskell] Nested guards?
simonpj at microsoft.com
Thu Dec 6 04:06:36 EST 2007
| Note that Clean also supports nested guards. See section 3.3 of the
| Clean language report:
Interesting, I didn't know that.
But (a) Clean guards don't bind, and pattern guards that bind was where this thread started. And (b) the Clean manual says: "To ensure that at least one of the alternatives of a nested guard will be successful, a nested guarded alternative must always have a 'default case' as last alternative". That's a pity. The main point about guards is that failure means "go on to the next equation", a semantics that they could have chosen I guess.
More information about the Haskell