Last active
December 28, 2015 13:29
-
-
Save PuercoPop/7508542 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; This works | |
(defun read-until (character stream) | |
"Read the stream until it matches the character. all the characters | |
read." | |
(coerce (loop | |
for char = (read-char stream) | |
until (char= char character) | |
until (char= char #\>) | |
collect char) | |
'string)) | |
;; But I want read until I reach One of N characters. Lets say > and | |
;; space, the loop becomes | |
(loop | |
for char = (read-char stream) | |
until (char= char #\Space) | |
until (char= char #\>) | |
collect char) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment