haskellcurryinginternal-representationpartial-application

How is a partial application represented at runtime?


When I write something like map (1+) list in Haskell, what is the internal representation of (1+)? Since it is a partial application of (+), the argument 1 has to be saved somewhere, but I can't get my head around this. Can somebody give me a brief explanation, how currying and partial application is implemented?


Solution

  • You may also want to check out Implementing Functional Languages: A Tutorial, a book by Simon Peyton Jones and David Lester.