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-initial call/cc
|
||||
(let* ([arity 1]
|
||||
[arity+1 (1+ arity)])
|
||||
(make-closure
|
||||
(lambda (v* sr)
|
||||
(if (= arity+1 (activation-rec-length v*))
|
||||
(if (= (activation-rec-length v*) 2)
|
||||
(call/cc ;; call/cc is "magic" for our purposes here,
|
||||
;; there are no reified continuations in the denotation
|
||||
(lambda (k)
|
||||
(invoke
|
||||
(activation-rec-ref v* 0)
|
||||
(let ([rec (make-activation-rec (+ 1 1))])
|
||||
(let ([rec (make-activation-rec 2)])
|
||||
(activation-rec-set!
|
||||
rec 0
|
||||
(make-closure
|
||||
(lambda (values r)
|
||||
(if (= arity+1 (activation-rec-length values))
|
||||
(if (= (activation-rec-length values) 2)
|
||||
(k (activation-rec-ref values 0))
|
||||
(error "Incorrect arity" 'continuation)))
|
||||
(*env*)))
|
||||
rec))))
|
||||
(error "Incorrect arity" 'call/cc)))
|
||||
(*env*))))
|
||||
(*env*)))
|
||||
(define-initial apply
|
||||
(make-closure
|
||||
(lambda (v* sr)
|
||||
|
||||
Reference in New Issue
Block a user