31 Mar
2009
31 Mar
'09
4:03 p.m.
http://www.haskell.org/haskellwiki/If-then-else#Replace_syntactic_sugar_by_a... mentions that there is no such function in Prelude. On Mon, Mar 30, 2009 at 11:33 AM, Peter Hickman <peterhi@ntlworld.com> wrote:
I've just written this piece of code
if r < 0 then LEFT else if r > 0 then RIGHT else STRAIGHT
which works just fine but it does look rather clunky (as it would in any language I suppose). Is there a Haskell idiom for this type of code?
_______________________________________________ Beginners mailing list Beginners@haskell.org http://www.haskell.org/mailman/listinfo/beginners