[R6RS] End of file object

Michael Sperber sperber at informatik.uni-tuebingen.de
Thu Mar 30 12:02:37 EST 2006


William D Clinger <will at ccs.neu.edu> writes:

> Anton wrote:
>> I'm not sure that extending COND is the right solution
>
> Me neither.  That was off the cuff.  I wouldn't have
> posted it if Mike hadn't asked me to.

Ah, OK.  I thought you had in mind a procedure like

(define (not-eof v)
  (if (eof-object? v)
      #f
      v)))

... which would allow you to write

(cond
  ((not-eof (read-char p))
   => (lambda (ch)))
  (else ...))

As for extending COND, there's SRFI 61.

-- 
Cheers =8-} Mike
Friede, Völkerverständigung und überhaupt blabla



More information about the R6RS mailing list