Dump previously created procedures in Scheme / Emacs

Posted by shapingthefuture@reddit | learnprogramming | View on Reddit | 4 comments

I'm currently working through SICP, which has you doing Scheme. I've only used VS Code in the past, but I'm fighting my way through Emacs for this. But I'm running into something that seems incredibly strange to me and I'm not finding any solutions from various attempts to Google this question. I suspect I'm using the wrong terms.

At one point, the book has you define a function for doing absolute value, defined with the name abs. Now, I would expect that if you remove that function definition from your file, it should stop working, because it's no longer defined.

Instead, it just keeps working in the REPL window, and I'm completely baffled as to why and how to reset my (sorry, I may not know the right term here) global scope.

Things I have tried so far:

1) Making sure my scheme file is completely empty, including opening it with a plain text editor in a new window to make 100% sure that it really is empty.

2) Closing both the file and the REPL and re-opening the REPL.

3) Completely exiting emacs and restarting it.