Skip to content

Instantly share code, notes, and snippets.

@Eskatrem
Created October 28, 2013 15:15
Show Gist options
  • Save Eskatrem/7198590 to your computer and use it in GitHub Desktop.
Save Eskatrem/7198590 to your computer and use it in GitHub Desktop.
macro to make the code of a function available while defining that function
(defparameter *maths-functions* (list))
(defmacro defun-maths (func-name args core)
"appends the code of func-name into maths-functions."
`(progn
(push (list (quote ,func-name) (quote ,@args) (quote ,core)) *maths-functions*)
(defun ,func-name ,args ,core)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment