Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
example for read macro
(set-dispatch-macro-character #\# #\o
(lambda (s c1 c2)
(declare (ignore c1 c2))
(let* ((form (read s))
(obj (car form))
(method (cadr form))
(args (cddr form)))
`(,method ,obj ,@args))))
(defmethod run ((name string))
(format t "~&~A is runing.~%" name))
(run "john")
#o("john" run)
#o("John" . (run))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment