How to export function written in scheme to a biwascheme REPL?

16 views
Skip to first unread message

Amirouche Boubekki

unread,
Dec 29, 2016, 3:12:48 PM12/29/16
to BiwaScheme
Héllo,


I'd like to create an app where the user interface will be an REPL.

I'd like to write my app mostly in scheme. How can run a scheme REPL that loads scheme procedures in the browser?


Tx!

Yutaka Hara

unread,
Jan 4, 2017, 10:08:12 AM1/4/17
to biwas...@googlegroups.com
Hello,
There is no official way to embed a REPL into your app, but it is not
so difficult to implement one.

(let loop ()
(display "\n:-> ")
(write (eval (read)))
(loop))

1. Read a program. (maybe (read-from-string str) is more convenient
for browser apps)
2. Eval it.
3. Print the result.
4. Loop again.

--
Yutaka HARA
Reply all
Reply to author
Forward
0 new messages