3 ms·
I really like k/q’s right to left parsing. something like: f(g(h(x))) Becomes f g h x Which I find very natural and better than x h g f Like in a stack la
by smabie 7y ago
I really like k/q’s right to left parsing. something like:
f(g(h(x)))
Becomes
f g h x
Which I find very natural and better than
x h g f
Like in a stack language.
- vthriller 7y ago> f(g(h(x))) Haskell has $ operator (simple application operator but with low precedence—think open bracket that closes implicitly at the end of expression). While it makes your example a bit more verbose: > f $ g $ h x it also allows one to pass multiple arguments in an intermediate function call, e.g. > f $ g x $ h y is the same in Haskell as > f (g x (h y)) which in most languages would be > f(g(x, h(y))
- dunefox 7y agoHaskell also allows point free style: (f . g . h) x