I'm learning scheme
programming from sicp textbook. I'm very new in scheme
. I have installed REPL for this. I don't know, How to scroll up in REPL
?
For example:
1 ]=> (define x 5)
;Value: x
1 ]=> x
;Value: 5
Now when I tied to scroll up value with up arrow key, I got some unexpected result. It is shown here:
1 ]=> ^[[A
can anyone tell me basic of how to use scheme interpreter? Thanks.
First of all, there is not one Scheme interpreter since there are numerous implementations. What you are looking for is readline support.
mit-scheme doesn't have it but if you are using a *nix system you can install rlwrap and start your interpreter with rlwrap scheme
and using arrow keys will work. Note that this can give history features to all programs, not just a scheme interpreter.
There are other implementations that come with readline support included, Racket, Chez Scheme, and Guile. Probably a lot more. They aren't always loaded by default so search the documentation on how to enable it.
If you are using a graphical operating system, like Windows, Gnome/KDE, or OSX using DrRacket with the SICP support language would give you more options on how to edit, run and even debug your programs.