Welcome to the CHICKEN Scheme pasting service

strange make-output-port behaviour added by klm` on Tue May 29 21:10:09 2018



(cond-expand
 (chicken-5 (import (chicken file posix)))
 (else      (use posix)))

(define port
  (let ((check #t))
    (make-output-port
     (lambda (s)
       (file-write 2 s) ;; <-- this works
       ;;((lambda () (file-write 2 s))) ;; <-- this doesn't, in csi
       )
     (lambda () #t))))

;; expecting to see "ab..." output here:
(##sys#with-print-length-limit
 2
 (lambda () (##sys#print "abcdefg" #f port)))

Your annotation:

Enter a new annotation:

Your nick:
The title of your paste:
Your paste (mandatory) :
Which one-argument R5RS procedure returns 2 when given `'(1 2 3)' as input?
Visually impaired? Let me spell it for you (wav file) download WAV