Skip to content

Instantly share code, notes, and snippets.

@snmsts
Created July 6, 2017 04:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save snmsts/bf7630c4631ad7cf7df8344bd144638c to your computer and use it in GitHub Desktop.
Save snmsts/bf7630c4631ad7cf7df8344bd144638c to your computer and use it in GitHub Desktop.
#,
(defun shecomma-reader (stream sub-character infix-parameter)
(declare (ignore sub-character infix-parameter))
(let ((a (gensym "A")))
`(lambda (&rest ,a) (apply ,(read stream nil nil) ,a))))
(set-dispatch-macro-character #\# #\, #'shecomma-reader)
(flet ((f (x) (* 2 x)))
(let ((f (lambda (x) (* 3 x))))
(values (#,#'f 1)(#,f 1))))
;; => 2 , 3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment