Fix error with eval in query.rkt
Racket handles the initial environment a bit differently to MIT scheme.
This commit is contained in:
parent
69d6bb6a37
commit
911dc3512d
|
@ -18,6 +18,10 @@
|
|||
|
||||
#lang sicp
|
||||
|
||||
(#%require (only racket/base make-base-namespace))
|
||||
|
||||
(define user-initial-environment (make-base-namespace))
|
||||
|
||||
;; Racket versions of stream procedures
|
||||
;; NB lang sicp uses promises for delayed evaluation. These can be forced
|
||||
;; directly with force (no evaluation needed).
|
||||
|
@ -137,8 +141,7 @@
|
|||
;;(put 'lisp-value 'qeval lisp-value)
|
||||
|
||||
(define (execute exp)
|
||||
(apply (eval (predicate exp)) ; NB: racket eval seems to
|
||||
; always take the user initial environment.
|
||||
(apply (eval (predicate exp) user-initial-environment)
|
||||
(args exp)))
|
||||
|
||||
(define (always-true ignore frame-stream) frame-stream)
|
||||
|
|
Loading…
Reference in New Issue