Skip to content

Instantly share code, notes, and snippets.

@christianwish
Created April 18, 2024 07:36
Show Gist options
  • Save christianwish/2de1b418c5158db2806967a728f0b82c to your computer and use it in GitHub Desktop.
Save christianwish/2de1b418c5158db2806967a728f0b82c to your computer and use it in GitHub Desktop.
(set-macro-character #\[
(lambda (stream char)
(declare (ignore char))
(let ((result (read-delimited-list #\] stream t)))
`(,@result))))
(set-macro-character #\]
(lambda (stream char)
(declare (ignore stream char))
(error "Unmatched closing bracket: ]")))
(let ([a "It Works with square brackets!"])
(print a))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment