16 lines
408 B
Scheme
16 lines
408 B
Scheme
|
(import (scheme base)
|
||
|
(scheme read)
|
||
|
(scheme eval)
|
||
|
(scheme write)
|
||
|
(picrin readline)
|
||
|
(picrin readline history))
|
||
|
(let loop ((n 1))
|
||
|
(let ((input (readline "> ")))
|
||
|
(if (eof-object? input)
|
||
|
(newline)
|
||
|
(begin
|
||
|
(add-history input)
|
||
|
(write (eval (read (open-input-string input)) '(picrin user)))
|
||
|
(newline)
|
||
|
(loop 1)))))
|