Fix create-process: it returns a transition

This commit is contained in:
Tony Garnock-Jones 2015-12-05 04:40:02 +13:00
parent 2ae8817a6b
commit 66fbb5e398
1 changed files with 3 additions and 4 deletions

View File

@ -345,7 +345,7 @@
(define (create-process w behavior initial-transition)
(if (not initial-transition)
w ;; Uh, ok
(transition w '()) ;; Uh, ok
(let ()
(define-values (postprocess initial-actions)
(match (clean-transition initial-transition)
@ -370,9 +370,8 @@
[behaviors (hash-set (world-behaviors w)
new-pid
behavior)]))
(w (enqueue-actions (postprocess w new-pid) new-pid remaining-initial-actions))
(w (deliver-patches w patches meta-action)))
w))))
(w (enqueue-actions (postprocess w new-pid) new-pid remaining-initial-actions)))
(deliver-patches w patches meta-action)))))
(define (deliver-patches w patches meta-action)
(transition (for/fold [(w w)] [(entry (in-list patches))]