Hacker News new | past | comments | ask | show | jobs | submit login

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]





Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: