continuing to work on the call/cc linkage
This commit is contained in:
parent
f3a5728f89
commit
beb592d251
|
@ -29,7 +29,7 @@
|
||||||
(make-undefined)]
|
(make-undefined)]
|
||||||
)))))]))
|
)))))]))
|
||||||
|
|
||||||
(define my-callcc
|
(define call/cc
|
||||||
(make-closure call/cc-label
|
(make-closure call/cc-label
|
||||||
1
|
1
|
||||||
'()))
|
'()))
|
||||||
|
@ -57,4 +57,4 @@
|
||||||
display
|
display
|
||||||
displayln
|
displayln
|
||||||
newline)
|
newline)
|
||||||
#:constants (null pi e)))
|
#:constants (null pi e call/cc)))
|
||||||
|
|
|
@ -531,5 +531,9 @@
|
||||||
#:control-limit 1)
|
#:control-limit 1)
|
||||||
|
|
||||||
|
|
||||||
|
(test (let ([x 16])
|
||||||
|
(call/cc (lambda (k) (+ x x))))
|
||||||
|
32)
|
||||||
|
|
||||||
;(simulate (compile (parse '42) 'val 'next))
|
;(simulate (compile (parse '42) 'val 'next))
|
||||||
;(compile (parse '(+ 3 4)) 'val 'next)
|
;(compile (parse '(+ 3 4)) 'val 'next)
|
Loading…
Reference in New Issue
Block a user