[Haskell-cafe] Re: Coding conventions for Haskell?
Wolfgang Jeltsch
g9ks157k at acme.softbase.org
Fri Oct 1 03:57:45 EDT 2010
Am Sonntag, den 26.09.2010, 17:25 +0100 schrieb Maciej Piechotka:
> I use it in following way;
>
> 1. For short sharing name (rarely)
>
> let a = b ++ c in (a, a)
>
> 2. Default
>
> let a :: [Int]
> a = b ++ c
> f :: Int -> String
> f 0 = ""
> f x = show x
> in map f a
I like to separate declaration by empty lines:
let
a :: [Int]
a = b ++ c
f :: Int -> String
f 0 = ""
f x = show x
in map f a
I think this is much more readable, since you can easily see which of
those lines belong together.
Best wishes,
Wolfgang
More information about the Haskell-Cafe
mailing list