Hacker News new | ask | show | jobs
by penpapersw 3296 days ago
Idris style/semantics question: why does the last line of the first example in the article use parentheses[1] instead of another dollar sign[2]?

[1]

    caesar_cipher : Int -> String -> String
    caesar_cipher shift input =
      let cipher = chr . (+ shift) . ord
      in pack $ map cipher (unpack input)
[2]

    caesar_cipher : Int -> String -> String
    caesar_cipher shift input =
      let cipher = chr . (+ shift) . ord
      in pack $ map cipher $ unpack input
To me the second one seems more readable. Are there semantic differences? Performance differences?