[Haskell-cafe] Re: [newbie] How to test this function?
Benjamin Franksen
benjamin.franksen at bessy.de
Thu Sep 21 14:12:07 EDT 2006
Bruno Martínez wrote:
> On Thu, 21 Sep 2006 01:52:38 -0300, Donald Bruce Stewart
> <dons at cse.unsw.edu.au> wrote:
>
>>> First, how do I fix the identation of the if then else?
>> getList = find 5
>> where find 0 = return []
>> find n = do
>> ch <- getChar
>> if ch `elem` ['a'..'e']
>> then do tl <- find (n-1)
>> return (ch : tl)
>> else find n
>
> OK. Thanks. I didn't find that one because it's not offered as an
> identation option in emacs haskell mode.
Emacs is evil!
It also inserts random tab characters into your code just to save a few
space bytes. Tends to completely trash indentation e.g. when pasting code
into mails etc.
Ben
More information about the Haskell-Cafe
mailing list