Menu

#6 Closures don't work.

open
nobody
None
5
2003-04-18
2003-04-18
Anonymous
No

*[fdscript] (define counter
(let ((count 0))
(lambda ()
(set! count (+ count 1))
count)))
;; Nothing (void) was returned
;; Values changed (1): COUNTER
*[fdscript] (counter)
;; + < LAMBDA
;; !fdscript! Unexpected end of file while reading
DTYPE (+: ) #?
;; ! To see more details set %DEBUG
;; !fdscript! Unexpected end of file while reading
DTYPE (NULL) #?
;; ! To see more details set %DEBUG
;; !fdscript! Unexpected end of file while reading
DTYPE (NULL) #?
;; ! To see more details set %DEBUG
;; !fdscript! Unexpected end of file while reading
DTYPE (NULL) #?
;; ! To see more details set %DEBUG
;; Nothing (void) was returned
*[fdscript]

Discussion


Log in to post a comment.

MongoDB Logo MongoDB