Bas van Dijk
basvandijk at home.nl
Sat Jul 1 04:34:07 EDT 2006
I would like to propose a feature from the FP language Clean called Nested
Guards. Example from :
example arg1 arg2
| predicate11 arg1
| predicate21 arg2 = calculate1 arg1 arg2
| predicate22 arg2 = calculate2 arg1 arg2
| otherwise = calculate3 arg1 arg2
| predicate12 arg1 = calculate4 arg1 arg2
I think the semantics are clear enough.
Nested Guards should also be interoperable with Pattern Guards. When a
match on a pattern guard succeeds the environment is updated with the new
bindings. Then the potential nested guards are matched in order in this new
What do you think?
Bas van Dijk.
 ftp://ftp.cs.kun.nl/pub/Clean/Clean20/doc/CleanRep2.0.pdf (See 3.3 Guards)
More information about the Haskell-prime