module Sound.Sc3.Ugen.Brackets where
import Data.Bifunctor
import qualified Sound.Osc.Packet as Osc
type Brackets = ([Osc.Message], [Osc.Message])
emptyBrackets :: Brackets
emptyBrackets :: Brackets
emptyBrackets = ([], [])
concatBrackets :: [Brackets] -> Brackets
concatBrackets :: [Brackets] -> Brackets
concatBrackets = ([[Message]] -> [Message])
-> ([[Message]] -> [Message])
-> ([[Message]], [[Message]])
-> Brackets
forall a b c d. (a -> b) -> (c -> d) -> (a, c) -> (b, d)
forall (p :: * -> * -> *) a b c d.
Bifunctor p =>
(a -> b) -> (c -> d) -> p a c -> p b d
bimap [[Message]] -> [Message]
forall (t :: * -> *) a. Foldable t => t [a] -> [a]
concat [[Message]] -> [Message]
forall (t :: * -> *) a. Foldable t => t [a] -> [a]
concat (([[Message]], [[Message]]) -> Brackets)
-> ([Brackets] -> ([[Message]], [[Message]]))
-> [Brackets]
-> Brackets
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [Brackets] -> ([[Message]], [[Message]])
forall a b. [(a, b)] -> ([a], [b])
unzip