Closed 0x0f0f0f closed 4 years ago
Do the first one if you're doing ocaml-style language. If you'll optimize lambdas by clumping them together, it'll be likely in this way: x → y → z → body
==>> (x ∧ y ∧ z) → body
, not by RLE-encoding original structures.
Chose the first one. Closing. A lot of things like partial application now snap together nicely. Thank you!
Should the definition for function expressions be like this
so that a function that takes 3 arguments becomes
(Lambda ("x", (Lambda ("y", Lambda ("z", ...body...))))
Or should i keep the list style?
where a function that takes 3 arguments is
(Lambda (["x"; "y"; "z"], ...body...)
I think the latter is easier to read, but the first one makes currying and static type inference easier.