[Haskell-cafe] How come pattern match does not recognize this code style?

Chaddaï Fouché chaddai.fouche at gmail.com
Mon Oct 26 07:05:49 EDT 2009


On Mon, Oct 26, 2009 at 6:08 AM, Magicloud Magiclouds
<magicloud.magiclouds at gmail.com> wrote:
> Ah, I see.
> The reason I have to use my style is the same as others: the list is
> too long....

You don't have to put everything on the same line, you just have to
indent the rest of the pattern a bit more than the first line :

> case bala of
>  [ bala
>    , bala
>    , bala ] -> bala bala bala
>  _ -> bala

-- 
Jedaï


More information about the Haskell-Cafe mailing list