Files
RustAst/examples/currying.myc
T
Michael Schimmel 0bbe35eeec feat: Implement closure cracking and inlining
Introduces a new optimizer pass that can "crack" closures, allowing for
more aggressive specialization. It also enables inlining of upvalues
that point to immutable global variables. This removes overhead for
higher-order functions and currying when arguments are statically
resolvable.
2026-02-21 18:49:55 +01:00

6 lines
99 B
Plaintext

;; Output: 42
(do
(def f (fn [a] (fn [b] (fn [c] (+ a (+ b c))))))
(((f 10) 12) 20)
)