cond and match

David Feuer [email protected]
Fri, 7 Dec 2001 17:12:52 -0500 (EST)


I'm wondering why Haskell doesn't support Scheme-like cond statements or a
pattern matching predicate.

cond
   c1->v1
   c2->v2
   ....

or possibly
cond
   | c1 -> v1
   | c2 -> v2
   ...

would translate as

case () of
	_ | c1 -> v1
	  | c2 -> v2
	  | ....

also, it seems that a match predicate could occasionally be useful

match p v would mean
case v of
   p -> True
   _ -> False