Skip to content

Instantly share code, notes, and snippets.

@agumonkey agumonkey/progm.el
Created Mar 7, 2019

Embed
What would you like to do?
(defmacro progm (body)
(if (null body)
'()
`(cons ,(car body)
(progm ,(cdr body)))))
(defmacro progb (&rest pair)
(let ((a (car pair))
(b (cadr pair)))
`(cons ,a (cons ,b nil))))
(progb
(+ 1 2)
(+ 1 2 3)
(+ 1 2 3 4))
(defmacro progm (&rest body)
(let ((h (car body)))
(if (null h)
'()
`(cons ,h (progm ,@(cdr body))))))
(progm (+ 12 3 4)
(+ 0 1 0)
(list 1 2 3)
(message "foo"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.