scsh-0.6/ps-compiler/prescheme/test/write.scm

20 lines
413 B
Scheme
Raw Normal View History

1999-09-14 08:45:02 -04:00
; Copyright (c) 1994 by Richard Kelsey. See file COPYING.
(define (test)
(let* ((b (allocate-memory 16))
(res (read-block (current-input-port)
b
16
(lambda (okay? eof? got)
(if (or (not okay?)
eof?)
-1
(write-block (current-output-port)
b
got
(lambda (okay? sent)
(if okay? sent -1))))))))
(deallocate-memory b)
res))