I could twiddle like this forever, one last change before compiler
This commit is contained in:
@@ -213,28 +213,26 @@
|
|||||||
(define-primitive + + 2)
|
(define-primitive + + 2)
|
||||||
(define-primitive = = 2)
|
(define-primitive = = 2)
|
||||||
(define-initial call/cc
|
(define-initial call/cc
|
||||||
(let* ([arity 1]
|
(make-closure
|
||||||
[arity+1 (1+ arity)])
|
(lambda (v* sr)
|
||||||
(make-closure
|
(if (= (activation-rec-length v*) 2)
|
||||||
(lambda (v* sr)
|
(call/cc ;; call/cc is "magic" for our purposes here,
|
||||||
(if (= arity+1 (activation-rec-length v*))
|
;; there are no reified continuations in the denotation
|
||||||
(call/cc ;; call/cc is "magic" for our purposes here,
|
(lambda (k)
|
||||||
;; there are no reified continuations in the denotation
|
(invoke
|
||||||
(lambda (k)
|
(activation-rec-ref v* 0)
|
||||||
(invoke
|
(let ([rec (make-activation-rec 2)])
|
||||||
(activation-rec-ref v* 0)
|
(activation-rec-set!
|
||||||
(let ([rec (make-activation-rec (+ 1 1))])
|
rec 0
|
||||||
(activation-rec-set!
|
(make-closure
|
||||||
rec 0
|
(lambda (values r)
|
||||||
(make-closure
|
(if (= (activation-rec-length values) 2)
|
||||||
(lambda (values r)
|
(k (activation-rec-ref values 0))
|
||||||
(if (= arity+1 (activation-rec-length values))
|
(error "Incorrect arity" 'continuation)))
|
||||||
(k (activation-rec-ref values 0))
|
(*env*)))
|
||||||
(error "Incorrect arity" 'continuation)))
|
rec))))
|
||||||
(*env*)))
|
(error "Incorrect arity" 'call/cc)))
|
||||||
rec))))
|
(*env*)))
|
||||||
(error "Incorrect arity" 'call/cc)))
|
|
||||||
(*env*))))
|
|
||||||
(define-initial apply
|
(define-initial apply
|
||||||
(make-closure
|
(make-closure
|
||||||
(lambda (v* sr)
|
(lambda (v* sr)
|
||||||
|
|||||||
Reference in New Issue
Block a user