diff options
| author | 2024-12-31 15:09:56 -0500 | |
|---|---|---|
| committer | 2024-12-31 15:09:56 -0500 | |
| commit | 6877be9998075bcfaab9a2e9ee1cc1f4e695828c (patch) | |
| tree | d7f3c42e2001b748c68412009e81ab0e5d8c77a7 | |
| parent | turn pure operations on metacontinuations into called procedures (diff) | |
rename incorrect "formal" to "args"
| -rw-r--r-- | cps.scm | 22 |
1 files changed, 11 insertions, 11 deletions
@@ -84,19 +84,19 @@ ;;; arguments are related to the object that is passed to `kont`. (define-record-type/destructor <cps-apply-kont> - (cps-apply-kont to-pass metakont kont) + (cps-apply-kont args metakont kont) cps-apply-kont? cps-apply-kont=> - (to-pass %apply-kont:to-pass) + (args %apply-kont:args) (metakont %apply-kont:metakont) (kont %apply-kont:kont)) (define-record-type/destructor <cps-apply> - (cps-apply proc formal metakont kont) + (cps-apply proc args metakont kont) cps-apply? cps-apply=> (proc %apply:proc) - (formal %apply:formal) + (args %apply:args) (metakont %apply:metakont) (kont %apply:kont)) @@ -118,13 +118,13 @@ => (formal metakont-formal kont-formal body))) `(lambda ((,metakont-formal ,kont-formal) ,formal) ,(cps->sexpr body))) - (after ((let (cps-apply-kont=> form) => (to-pass metakont kont))) - (let ((to-pass (if (cps-closure? to-pass) - (cps->sexpr to-pass) - to-pass))) - `(pass ,to-pass ,metakont ,(cps->sexpr kont)))) - (after ((let (cps-apply=> form) => (proc formal metakont kont))) - `(apply ,proc ,formal ,metakont ,(cps->sexpr kont))) + (after ((let (cps-apply-kont=> form) => (args metakont kont))) + (let ((args (if (cps-closure? args) + (cps->sexpr args) + args))) + `(pass ,args ,metakont ,(cps->sexpr kont)))) + (after ((let (cps-apply=> form) => (proc args metakont kont))) + `(apply ,proc ,args ,metakont ,(cps->sexpr kont))) (after ((let (cps-if=> form) => (conditional on-true on-false metakont kont))) `(if conditional |
