feat: add compiler macro for functionalize

This commit is contained in:
Edward Langley
2023-03-26 11:06:40 -07:00
parent c9dbe2109f
commit f51e305922

View File

@ -24,6 +24,16 @@
(:method ((it function))
it))
(define-compiler-macro functionalize (&whole whole it)
(typecase it
(cons (destructuring-bind (h . tail) it
(declare (ignore tail))
(case h
(quote it)
(function it)
(t whole))))
(t whole)))
;;; TODO: consider making this wrap defalias?
(defmacro shortcut (name function &body bound-args)
`(eval-when (:load-toplevel :compile-toplevel :execute)