On 11 June 2010 14:40, Bulat Ziganshin <bulat.zigans...@gmail.com> wrote:
>> if x        then foo
>> else if y then bar
>> else if z then mu
>> else             zot
>
> case () of
>  _ | x -> foo
>   | y -> bar
>   | otherwise -> zor
>
> it's usually considered as "haskell way" of doing this

The example is merely to demonstrate how optional layout can encode
useful patterns, not to claim there aren't other ways to do it in
Haskell. For what it's worth, this solution is pretty hackish and so
not really Haskelly.
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to