4 ms·
Similarly, Haskell would be: add = (+) f = add 1 f 2 This kind of syntax is great for small code samples or to play in a CLI, but in larger progra
by catwell 8y ago
Similarly, Haskell would be:
add = (+)
f = add 1
f 2
This kind of syntax is great for small code samples or to play in a CLI, but in larger programs more traditional (verbose) syntax works better for me. YMMV.
- moomin 8y agoThe syntax, though, is part of a more important point: all functions have one input and one output. This _massively_ simplifies other things. Also, and this isn’t really an FP point, if you’ve got a lot of positional parameters you’re already Doing It Wrong.