[Haskell-cafe] Haskell newbie indentation query.
Vivek.Ramaswamy at FMR.COM
Wed Oct 15 07:39:54 EDT 2008
I have just started with Haskell, and I must confess; I am in love with
However one area that I am really confused about is indentation.
Lets take a look at if-else if- else block.
The way I understand it:
else if nothing
The code above gives out an error. I have been programming in python
and the above appears fine.
But it does not work.
What works is:
I find the above scheme extremely confusing. I tried going to:
reading I am even more confused.
Can somebody please explain how the Haskell indentation works?
The else-if and else seem to be aligning up with "then". They should be
aligning with "If" in my opinion.
Thanks in advance.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe