"Final" Scheme REPL definitions: how to save them?
Posted
by
Aeneas
on Programmers
See other posts from Programmers
or by Aeneas
Published on 2013-05-13T08:23:12Z
Indexed on
2013/06/28
4:28 UTC
Read the original article
Hit count: 202
Scheme
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?
© Programmers or respective owner