4 ms·
How Erlang evaluates funs (i.e. lambdas)
- andr 18y agoso how does eval_fun evaluate functions, then?
- hassy 18y agoI don't think this has anything to do with Erlang's internals, which is what the headline suggests. Most likely this is a snippet of code from Reia dealing with currying or partial application support.
- rvirding 18y agoThis is code from the erlang interpreter, erl_eval. It takes the abstract syntax of the code for a fun and returns a "real" fun which when called will interpret the code. This means that the fun which is returned can be called by compiled code, any code for that matter, as if it were compiled. It has absolutely nothing to do with the code the compiler generates for a fun.