Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #| -*- lisp -*-
- exec sbcl --script $0 $* # |#
- ;;≈ç√Ωπøπøˆøˆˆ©ƒ√∂
- (set-dispatch-macro-character
- #\# #\/ (lambda(stream subchar arg)
- (declare (ignore subchar arg))
- (list (quote quote) (read stream t nil t))))
- (defun concat(&rest r) (apply #'concatenate #/string r))
- (import #/(sb-impl::quasiquote sb-impl::unquote-splice
- sb-impl::unquote-nsplice sb-impl::unquote))
- (set-dispatch-macro-character
- #\# #\` (lambda(stream subchar arg)
- (declare (ignore subchar arg))
- (list #/quasiquote (read stream t nil t))))
- (set-dispatch-macro-character
- #\# #\, (lambda(s subchar arg)
- (declare (ignore subchar arg))
- (case (peek-char nil s)
- (#\@ (read-char s) (unquote-splice (read s t nil t)))
- (#\. (read-char s) (unquote-nsplice (read s t nil t)))
- (t (unquote (read s t nil t))))))
- (print (unquote 100))
- (print (unquote-splice 100))
- (print (unquote-nsplice 100))
- (print (quasiquote (quasiquote 100)))
- (print '`,(1 2))
- (print '`#,(1 2))
- (terpri)
- (eval `(format ,@(list t "qwert~d~%" 9991)))
- (eval `(format ,@(list t "qwert~d~%" 9992)))
- (eval `(format ,@(list t "qwert~d~%" 9993)))
- (print ' `( ,format ,.(list t) ,@(list t "qwert~d ~s~%" 9994 '|q|w)))
- (print '#`(#,format #,.(list t) #,@(list t "qwert~d ~s~%" 9994 '\qw)))
- (print '#`(#,format #,.(list t) #,@(list t "qwert~d ~s~%" 9994 #/ \qw)))
- (print #/#`(#,format #,.(list t) #,@(list t "qwert~d ~s~%" 9994 #/|q|w)))
- (print #/(\/\/\/w\/w\hw))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement