[plt-scheme] top-level error
Hi,
I am really confused that why DrSchme complains that:
BUG reference to undefined identifier: make-stack
for the code below when i click "Run"
(define aim-cell-stk (make-stack))
(define make-stack
(lambda ()
(let ((ls '()))
(lambda (msg . entries)
(cond
((eqv? msg 'empty?)
(null? ls))
((eqv? msg 'push!)
(set! ls (cons (car entries) ls)))
((eqv? msg 'top)
(car ls))
((eqv? msg 'pop!)
(set! ls (cdr ls)))
(else
"Oops, invalid message!"))))))
Both are in the top-level environment, why the complaint?