[Haskell-beginners] What is the Haskell idiom for "if then else
hrushikesh.tilak at gmail.com
Tue Mar 31 04:03:08 EDT 2009
mentions that there is no such function in Prelude.
On Mon, Mar 30, 2009 at 11:33 AM, Peter Hickman <peterhi at ntlworld.com> wrote:
> I've just written this piece of code
> if r < 0
> then LEFT
> 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 at haskell.org
More information about the Beginners