Describe choice

Co-authored-by: Alex <alexei.drake@tweag.io>
This commit is contained in:
Marco Perone 2023-01-26 12:34:16 +01:00 committed by Marco Perone
parent c97e7bf21e
commit 0f7034e625

View File

@ -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