Hello,
Is there any clever way of binding values to the list of unknown
symbols in scheme?
In common lisp there is a form "progv" that takes the list of symbols
and their corresponding values and binds them within the body of
progv.
It is possible to do it using eval, like this:
(define (bind-and-eval symbols values body)
(eval `((lambda ,symbols ,body) . ,values)
(interaction-environment)))
(define-syntax let-symbols
(syntax-rules ()
((_ symbols values (body ...))
(bind-and-eval symbols values (quote (body ...))))))
but using eval for this just seems too heavy. Is there any way of
doing it that would be more legal?
Best regards,
M.