Advertisement
Guest User

Untitled

a guest
Oct 26th, 2019
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lisp 0.52 KB | None | 0 0
  1. (set-dispatch-macro-character #\# #\{
  2.   (lambda (s c n)
  3.     (declare (ignore c n))
  4.     `'(run-in-language
  5.        ,(with-output-to-string (s*)
  6.           (loop with maybe-} = nil
  7.                 for char = (read-char s)
  8.                 do (cond
  9.                     ((char= #\} char)
  10.                      (setf maybe-} t))
  11.                     ((and maybe-} (char= #\# char))
  12.                      (return))
  13.                     (t
  14.                      (setf maybe-} nil)
  15.                      (write-char char s*))))))))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement