Re: cond and match
Hello! On Sun, Dec 09, 2001 at 01:07:08PM +, Marcin 'Qrczak' Kowalczyk wrote: Fri, 7 Dec 2001 17:12:52 -0500 (EST), David Feuer [EMAIL PROTECTED] pisze: I'm wondering why Haskell doesn't support Scheme-like cond statements or a pattern matching predicate. I agree that both constructs make sense. The main objective is probably that the syntax is already quite rich and this would be another thing to learn and implement. As well, these constructs would reserve two more identifiers and so break quite some existing programs. I could expect that especially match could be used sometimes, like let match = search foo bar in use match somehow Kind regards, Hannah. ___ Haskell-Cafe mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: cond and match
Fri, 7 Dec 2001 17:12:52 -0500 (EST), David Feuer [EMAIL PROTECTED] pisze: I'm wondering why Haskell doesn't support Scheme-like cond statements or a pattern matching predicate. I agree that both constructs make sense. The main objective is probably that the syntax is already quite rich and this would be another thing to learn and implement. -- __( Marcin Kowalczyk * [EMAIL PROTECTED] http://qrczak.ids.net.pl/ \__/ ^^ QRCZAK ___ Haskell-Cafe mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell-cafe
cond and match
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 ___ Haskell-Cafe mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell-cafe