I'm not argueing against pattern guards (nor for them;-), but perhaps the attached translations of Conor's and David's examples might help to dispel some myths. For the translation idea, see my earlier email:

http://www.haskell.org/pipermail/haskell-prime/2006-February/000597.html

If it wasn't for those pesky returns/guards, one might claim the translations
to be as concise as the originals. As it stands, the results of the translation
are rather more awkward but -and this is the important point- pattern
guards do not add new functionality. And fortunately, David only asked for "nearly as concise":)

hth,
Claus

Attachment: PG.hs
Description: Binary data

_______________________________________________
Haskell-prime mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-prime

Reply via email to