Permit function to return #f in transition-bind
This commit is contained in:
parent
1a63a2c35d
commit
53d0a67e96
|
@ -100,8 +100,9 @@
|
|||
|
||||
(define (transition-bind k t0)
|
||||
(match-define (transition state0 actions0) t0)
|
||||
(match-define (transition state1 actions1) (k state0))
|
||||
(transition state1 (cons actions0 actions1)))
|
||||
(match (k state0)
|
||||
[(transition state1 actions1) (transition state1 (cons actions0 actions1))]
|
||||
[#f t0]))
|
||||
|
||||
(define (sequence-transitions t0 . steps)
|
||||
(foldl transition-bind t0 steps))
|
||||
|
|
Loading…
Reference in New Issue