3 ms·
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 pa
by silentbicycle 18y ago
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`.