Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,12 @@
|
|||
(define (eval-with-x prog x)
|
||||
(eval prog (environment-new (list (list 'x x)))))
|
||||
|
||||
(define prog '( + 1 (* x x)))
|
||||
|
||||
(eval-with-x prog 10) → 101
|
||||
(eval-with-x prog 1000) → 1000001
|
||||
(- (eval-with-x prog 1000) (eval-with-x prog 10)) → 999900
|
||||
|
||||
;; check x is unbound (no global)
|
||||
x
|
||||
😖️ error: #|user| : unbound variable : x
|
||||
Loading…
Add table
Add a link
Reference in a new issue