On Wed, Aug 15, 2007 at 06:58:40PM +0100, Duncan Coutts wrote: > On Wed, 2007-08-15 at 10:50 -0700, Stefan O'Rear wrote: > > > OTOH, your proposal provides (IMO) much more natural syntax for > > multi-pattern anonymous functions, especially if we stipulate that > > unlike a case (but like a lambda) you can have multiple arguments; then > > you could write stuff like: > > > > sumTo0 = foldr (\of 0 k -> 0 > > n k -> n + k) 0 > > > > Anyone else like this? > > Why not just: > > sumTo0 = foldr (\0 k -> 0 > n k -> n + k) 0
Because it would break a very large amount of old code, and I think H' was supposed to be upward compatible: foo = getSomethingCPS $ \ arg -> moreStuff is now a syntax error (\ { varid -> } matches no productions). Stefan
signature.asc
Description: Digital signature
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe