Skip to content

Comment on Ask HN: effects of prefix notation on coding / thinking

Comments

Some languages allow an unambiguous mix of infix and prefix.

  OCaml & Haskell:   5 + 7    or   (+) 5 7
Most non-alphanumeric operators are infix unless in parens.
  Haskell: map (\ x -> x + 1) [1, 2, 3]   
           or (\ x -> x + 1) `map` [1, 2, 3]
Two-argument, alphanumerically named functions can be made infix with `backticks`.
AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.