3e5de399a7
I've just moved the relevant code into the functional-tests dir.
12 lines
310 B
Scheme
12 lines
310 B
Scheme
|
|
(define (read-line . o)
|
|
(let ((port (if (pair? o) (car o) (current-input-port))))
|
|
(let lp ((res '()))
|
|
(let ((c (read-char port)))
|
|
(cond
|
|
[(and (eof-object? c) (null? res)) #f]
|
|
[(or (eof-object? c) (eqv? c #\newline))
|
|
(list->string (reverse res))]
|
|
[else
|
|
(lp (cons c res))])))))
|