3 ms·
Yes. http://www.haskell.org/haskellwiki/Currying http://www.haskell.org/haskellwiki/Currying
by steveklabnik 14y ago
Yes. http://www.haskell.org/haskellwiki/Currying http://www.haskell.org/haskellwiki/Currying
- andrus 14y agoThank you for clarifying! I did not know that all functions in Haskell are considered curried. My surprise stemmed in part from reading a bit about "arity" from [1]. It's interesting how the theoretical model of Haskell--"all functions in Haskell take just single arguments"--differs from implementation, where, for functions of known arity, GHC in particular does not actually "follow the currying story literally" [2]. [1] http://hackage.haskell.org/trac/ghc/wiki/Commentary/Rts/HaskellExecution/FunctionCalls#Genericapply http://hackage.haskell.org/trac/ghc/wiki/Commentary/Rts/Hask... [2] http://community.haskell.org/~simonmar/papers/eval-apply.pdf http://community.haskell.org/~simonmar/papers/eval-apply.pdf
- steveklabnik 14y agoAny time. It's one of the more interesting parts of Haskell to me, so it's one I always remember. You're absolutely right to point out that implementations and theory often differ; compilers often do tricky things behind the scences.