5 ms·
The point is about composability of functions though. Your example does it statically. Currying and partial application allows it to be done dynamically within
by kitd 7y ago
The point is about composability of functions though. Your example does it statically. Currying and partial application allows it to be done dynamically within the running program.
- deleted 7y ago[deleted]
- kazinator 7y agoActually my example is based on partial application involving anonymous functions. It's just hand compiled. I manually lifted the lambda to the top level, and de-anonymized it with a name. Then I realized that the only captured parameter had a binding to a string literal "Good Morning", so I propagated that literal into the closure body, eliminating the variable, and that variable's environment. It ended up looking static due to the static literal, basically.