"Final" Scheme REPL definitions: how to save them?
- by Aeneas
Is there a way to show and save all "final" definitions entered into a Scheme REPL into a text file?
Say, if I have defined in the REPL:
(define (increase x) (+ 1 x))
(define (multbytwo x) (* 3 x)) ; let us say this was an error
(define (multbytwo x) (* 2 x))
I want to save this into an .scm-file with the content:
(define (increase x) (+ 1 x))
(define (multbytwo x) (* 2 x))
i.e. the multbytwo function that got defined erraneously shall be "forgotten" due to re-definition. Is this possible?