Plaster
New
List
Login
common-lisp
default
anonymous
2018.07.09 18:05:54
(defmacro fbind (bindings &body body) "Binds the function objects in the function namespace." `(flet ,(loop with gensym = (gensym) for (name function) in bindings collect `(,name (&rest ,gensym) (apply ,function ,gensym))) ,@body))
Raw
Annotate
Repaste
Edit
Annotations
text
default
anonymous
2018.07.09 18:06:41
(fbind ((foo #'print) (bar #'1+)) (foo (bar 42))) (FLET ((FOO (&REST #:G1204562) (APPLY #'PRINT #:G1204562)) (BAR (&REST #:G1204562) (APPLY #'1+ #:G1204562))) (FOO (BAR 42)))
Raw
Repaste
Edit