[pro] Lisp 2's and function values.
Matthew D. Swank
akopa at charter.net
Thu May 26 00:07:22 UTC 2011
On 05/25/2011 04:05 PM, Alessio Stalla wrote:
> It's not about syntax, it's about a missing feature: the ability to
> bind a symbol's function "cell" to a value that's not known at compile
> time.
I've used this for pedagogical purposes:
(defmacro f-let ((&rest bindings) &body body)
(let* ((let-bindings (mapcar (lambda (binding)
(list (gensym) (cadr binding)))
bindings))
(flet-bindings (mapcar (lambda (binding let-binding)
`(,(car binding) (&rest args)
(apply ,(car let-binding) args)))
bindings
let-bindings)))
`(let ,let-bindings
(flet ,flet-bindings
, at body))))
but it hardly solves the problem.
More information about the pro
mailing list