Fix create-process: it returns a transition
This commit is contained in:
parent
2ae8817a6b
commit
66fbb5e398
|
@ -345,7 +345,7 @@
|
||||||
|
|
||||||
(define (create-process w behavior initial-transition)
|
(define (create-process w behavior initial-transition)
|
||||||
(if (not initial-transition)
|
(if (not initial-transition)
|
||||||
w ;; Uh, ok
|
(transition w '()) ;; Uh, ok
|
||||||
(let ()
|
(let ()
|
||||||
(define-values (postprocess initial-actions)
|
(define-values (postprocess initial-actions)
|
||||||
(match (clean-transition initial-transition)
|
(match (clean-transition initial-transition)
|
||||||
|
@ -370,9 +370,8 @@
|
||||||
[behaviors (hash-set (world-behaviors w)
|
[behaviors (hash-set (world-behaviors w)
|
||||||
new-pid
|
new-pid
|
||||||
behavior)]))
|
behavior)]))
|
||||||
(w (enqueue-actions (postprocess w new-pid) new-pid remaining-initial-actions))
|
(w (enqueue-actions (postprocess w new-pid) new-pid remaining-initial-actions)))
|
||||||
(w (deliver-patches w patches meta-action)))
|
(deliver-patches w patches meta-action)))))
|
||||||
w))))
|
|
||||||
|
|
||||||
(define (deliver-patches w patches meta-action)
|
(define (deliver-patches w patches meta-action)
|
||||||
(transition (for/fold [(w w)] [(entry (in-list patches))]
|
(transition (for/fold [(w w)] [(entry (in-list patches))]
|
||||||
|
|
Loading…
Reference in New Issue