You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if we had an uncurried language, we'd be able to see that (lam [acc x] (+ 1 acc)) has no free variables and therefore doesn't need an environment. instead, because we are currying, that represents two lambdas, and the variable is "free" inside the body of the inner lambda, because it was bound by the outer (or maybe I have the order switched up).
this makes me think that currying-by-default is worth reconsidering.
The text was updated successfully, but these errors were encountered:
an example of troublesome-looking
Sto
output:we see a lot of duplication and (most concerning to me), it appears as though currying-by-default means we cannot strip down the env of a closure.
this comes from a length computation across a large list:
if we had an uncurried language, we'd be able to see that
(lam [acc x] (+ 1 acc))
has no free variables and therefore doesn't need an environment. instead, because we are currying, that represents two lambdas, and the variable is "free" inside the body of the inner lambda, because it was bound by the outer (or maybe I have the order switched up).this makes me think that currying-by-default is worth reconsidering.
The text was updated successfully, but these errors were encountered: