Skip to content

Instantly share code, notes, and snippets.

@obriencj
Created August 17, 2017 04:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save obriencj/ed947df0d8b843ff0e7f6018ae5d79de to your computer and use it in GitHub Desktop.
Save obriencj/ed947df0d8b843ff0e7f6018ae5d79de to your computer and use it in GitHub Desktop.
sibilant with set-macro-character
sibilant > $100
NameError: name '$100' is not defined
sibilant > (set-macro-character "$" (lambda (stream c) `(dollars ,(read stream))) False)
sibilant > $100
NameError: name 'dollars' is not defined
sibilant > '$100
(dollars 100)
sibilant > (defun dollars (amt) (print "YOU FOUND" amt "DOLLARS!!"))
sibilant > $100
YOU FOUND 100 DOLLARS!!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment