Add fn! macro
For cl-function version of lambda, for implicit destructuring of arguments.
This commit is contained in:
parent
4c61f22132
commit
35b99fb272
1 changed files with 7 additions and 0 deletions
|
@ -264,6 +264,13 @@ See `if!' for details on this macro's purpose."
|
||||||
(macroexp-progn body)))
|
(macroexp-progn body)))
|
||||||
|
|
||||||
|
|
||||||
|
;;; Closure factories
|
||||||
|
(defmacro fn! (arglist &rest body)
|
||||||
|
"Expands to (cl-function (lambda ARGLIST BODY...))"
|
||||||
|
(declare (indent defun) (doc-string 1) (pure t) (side-effect-free t))
|
||||||
|
`(cl-function (lambda ,arglist ,@body)))
|
||||||
|
|
||||||
|
|
||||||
;;; Mutation
|
;;; Mutation
|
||||||
(defmacro appendq! (sym &rest lists)
|
(defmacro appendq! (sym &rest lists)
|
||||||
"Append LISTS to SYM in place."
|
"Append LISTS to SYM in place."
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue