質問

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

役に立ちましたか?

解決

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.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top