Paste number 338772: rcurry cmacro

Paste number 338772: rcurry cmacro
Pasted by: Bike
When:8 years, 1 month ago
Share:Tweet this! | http://paste.lisp.org/+79EC
Channel:None
Paste contents:
Raw Source | XML | Display As
(define-compiler-macro rcurry (function &rest arguments)
  (let ((rcurries (make-gensym-list (length arguments) "RCURRY"))
        (fun (gensym "FUN")))
    `(let ((,fun (ensure-function ,function))
           ,@(mapcar #'list rcurries arguments))
       (lambda (&rest more)
         (declare (dynamic-extent more))
         (multiple-value-call ,fun (values-list more) ,@rcurries)))))

This paste has no annotations.

Colorize as:
Show Line Numbers

Lisppaste pastes can be made by anyone at any time. Imagine a fearsomely comprehensive disclaimer of liability. Now fear, comprehensively.