Question

Is there a symbol that is used to refer to the return value of the last evaluated expression in the MIT/GNU Scheme repl?

For example:

Python uses _

Haskell uses it

Was it helpful?

Solution

Unlike Common Lisp which has the * REPL variable for this purpose, Scheme leaves this feature to implementors.

In MIT Scheme this can only be done in the builtin Edwin editor (accessed with mit-scheme --edit or by calling the (edit) function from the command line REPL). After executing something in the REPL, you can see the last result by entering C-x C-e. If you are not familiar with Emacs style commands, more information can be found at http://courses.csail.mit.edu/6.034s/04/scheme.html in the Key Bindings section.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top