mirror of
https://github.com/marcosh/crem.git
synced 2024-09-11 12:36:19 +03:00
Describe choice
Co-authored-by: Alex <alexei.drake@tweag.io>
This commit is contained in:
parent
c97e7bf21e
commit
0f7034e625
@ -59,7 +59,7 @@ instance Strong StateMachine where
|
||||
second' (Compose machine1 machine2) = Compose (second' machine1) (second' machine2)
|
||||
|
||||
-- * Choice
|
||||
|
||||
-- | An instance of `Choice` allows us to have parallel composition of state machines, meaning that we can pass two inputs to two state machines and get out the outputs of both
|
||||
instance Choice StateMachine where
|
||||
left' :: StateMachine a b -> StateMachine (Either a c) (Either b c)
|
||||
left' (Basic baseMachine) = Basic $ left' baseMachine
|
||||
|
Loading…
Reference in New Issue
Block a user