Last active
January 17, 2022 01:13
-
-
Save emacdona/b497b9a551caf3f68049736c64b989de to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defmacro code-generator-caller-1 (code-generator) | |
`(quote ,(funcall code-generator))) | |
(defmacro code-generator-caller-2 (code-generator) | |
`(quote ,(funcall (eval code-generator)))) | |
(defmacro run-example (symbol) | |
`(,symbol (lambda () 'hello))) | |
;; (run-example funcall) | |
;; yields: | |
;; HELLO | |
;; | |
;; (run-example code-generator-caller-2) | |
;; yields: | |
;; HELLO | |
;; | |
;; (run-example code-generator-caller-1) | |
;; yields: | |
;; The value | |
;; (LAMBDA () 'HELLO) | |
;; is not of type | |
;; (OR FUNCTION SYMBOL) | |
;; [Condition of type TYPE-ERROR] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment