Skip to content

Commit

Permalink
exercise 5.9
Browse files Browse the repository at this point in the history
  • Loading branch information
nwg committed Nov 2, 2019
1 parent 3b946f7 commit f2881cc
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions chapter-5/5.2/base.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -419,8 +419,10 @@
operations))
(aprocs
(map (lambda (e)
(make-primitive-exp
e machine labels))
(if (label-exp? e)
(error "Operation cannot operate on label expression")
(make-primitive-exp
e machine labels)))
(operation-exp-operands exp))))
(lambda () (apply op (map (lambda (p) (p))
aprocs)))))
Expand All @@ -439,3 +441,12 @@
(cadr val)
(error "Unknown operation: ASSEMBLE"
symbol))))


(define test-operation-with-symbol-machine
(make-machine
'()
(list (list 'display display))
'(
start
(perform (op display) (label start)))))

0 comments on commit f2881cc

Please sign in to comment.