To parade my ignorance... Something that's always puzzled me about Haskell is when to do something on the left and when on the right of a function definition. For example, there must be at least 4 ways of writing the factorial function: pattern match; guard; if ... then ... else ...; list comprehension + fold I can appreciate that the declunkification transformation simplifies a common problem but the cost seems to be yet another way of writing a for loop... Are there any style guidelines for when to use what? Greg Michaelson
- Re: A new view of guards Johannes Waldmann
- Re: A new view of guards Heribert Schuetz
- Re: A new view of guards Simon L Peyton Jones
- Re: A new view of guards Alex Ferguson
- Re: A new view of guards John Launchbury
- Re: A new view of guards Brian Boutel
- Re: A new view of guards Frank Christoph
- Re: A new view of guards Tony Davie
- Re: A new view of guards Andrew Moran
- Re: A new view of guards D. tweed
- Re: A new view of guards Greg Michaelson
- Re: A new view of guards Stefan Kahrs
- Re: A new view of guards Simon Marlow
- Re: A new view of guards Tony Davie
- Re: A new view of guards Libor Skarvada
- Re: A new view of guards Hans Aberg
- Re: A new view of guards Alex Ferguson
- Re: A new view of guards Heribert Schuetz
- Re: A new view of guards Alex Ferguson
- Re: A new view of guards Heribert Schuetz
- Re: A new view of guards Philip Wadler