[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: What's so cool about Scheme?
> But "bind-too-late" did work (mostly) in "old Lisp" because bindings
> obeyed a dynamic, stack-based discipline.
Ah, I get it.
It occurs to me that if old Lisp had had quasiquote, an easy workaround
would have been:
(DEFINE ADD-TO-ALL (LAMBDA (Z LS)
(MAPCAR (QUASIQUOTE (LAMBDA (X) (PLUS (UNQUOTE Z) X))) LS)))
Voila, FUNARG problem solved, upward and downward. ;) Am I missing
This wouldn't work if the inner lambda expression tried to mutate the value
of Z, so you'd have to also require that such expressions avoid mutating
captured "variables" - or better yet, make the entire language purely
functional and mutation-free.
So: closures are a poor man's pure functional language with quasiquote???
P.S. Man, my koan is going to need some work...