[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[MIT-Scheme-users] The behavior of set!
From: |
Peng Yu |
Subject: |
[MIT-Scheme-users] The behavior of set! |
Date: |
Tue, 19 Jan 2010 21:42:22 -0600 |
According to the following webpage,
http://www.shido.info/lisp/scheme_asg_e.html
(define var 1)
(set! var (* var 10))
var => 10
However, I get the following output from mit-scheme, when I try the
code. Would you please let me know what ';Value: 1' means? Is '1' the
old value of 'var'?
1 ]=> (define var 1)
;Value: var
1 ]=> (set! var (* var 10))
;Value: 1
1 ]=> (+ var 1)
;Value: 11
- [MIT-Scheme-users] The behavior of set!,
Peng Yu <=