Hacker News new | ask | show | jobs
by itishappy 562 days ago
Parenthesis are not really optional, they're just used differently than other languages. Other languages use parenthesis for function application and grouping, in Haskell it's just grouping.

    wordsPerLine = filter (>0) . map (length . words) . lines
Funnily enough, parenthesis are actually optional in Elixir, although it's a warning to use pipe syntax without them. The following is valid in both Haskell and Elixer:

    length [1,2,3]