3 ms·
Thanks for the clarification. I'm guilty of saying things like "Haskell does automatic currying" when in fact it does automatic partial application. But then ag
by dreamcompiler 4y ago
Thanks for the clarification. I'm guilty of saying things like "Haskell does automatic currying" when in fact it does automatic partial application. But then again I don't actually know what goes on under the sheets in Haskell. It might in fact convert every multi-argument function to a nested single-argument curry-like lambda form internally, whether it needs to or not. I expect that would be inefficient (because it would cons up a lot of unnecessary functions), but it's possible. Does Haskell only do partial application when it actually needs to, or does it do single-argument curry-ish partial application of every function regardless?
- shrimpx 4y agoBtw I’m not an expert but I believe Haskell treats all functions as unary, but they’re translated to N-ary in an optimizing compiler.