Pergunta

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

Foi útil?

Solução

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.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top