Comment 2 for bug 251642

Revision history for this message
Abdulaziz Ghuloum (aghuloum) wrote :

Example: no implementation of R6RS runs the following program:

#!r6rs
(import (rnrs))
(let ([p
       (let ([pos 0])
         (define-record-type P (fields pos))
         (make-custom-textual-input-port "foo"
           (lambda (s i c) (set! pos (+ pos c)) c)
           (lambda () (make-P pos))
           (lambda (x) (set! pos (P-pos x)))
           (lambda () (display "done\n"))))])
  (lookahead-char p)
  (port-position p))