Subject: Re: struggling with READ-CHAR and LOOP (accumulating digits)
From: Erik Naggum <>
Date: 30 Oct 2000 09:04:20 +0000
Newsgroups: comp.lang.lisp
Message-ID: <>

* Kent M Pitman <>
| (defun whitespace-p (char) 
|   (or (eql char #\Space) (not (graphic-char-p char))))
| (defun gobble-whitespace (&optional (stream *standard-input*))
|   (loop for c = (read-char stream nil nil)
|         until (or (not c) ;eof
|                   (not (whitespace-p c)))))

  I use (peek-char t <stream>) for this.  Several older Lispers have
  been surprised that this functionality is in there, but it has been
  since CLtL1.

  Does anyone remember where I parked Air Force One?
                                   -- George W. Bush