On 20050524T111249+0200, Benjamin Franksen wrote: > The problem is that the 'else' must be indented > further than the 'if', so that this: > > if cond then > on_true > else > on_false > > usually gives me a syntax error.
I usually write that as
if cond
then on_true
else on_false
or, another example,
if cond
then do on_true_1
on_true_2
else do on_false_1
on_false 2
which looks a little odd looking from a C/Pascal-style perspective but
is logical and understandable.
--
Antti-Juhani Kaijanaho http://antti-juhani.kaijanaho.info/
Blogi - http://kaijanaho.info/antti-juhani/blog/
Toys - http://www.cc.jyu.fi/yhd/toys/
signature.asc
Description: Digital signature
_______________________________________________ Haskell mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell
