Is there something like reactive-bananas
union
function in elerea
?
union :: Signal a -> Signal a -> Signal a
This just merges the two signals into one stream. Ideally I am searching for an efficient union of a large number (14k) of signals:
unions :: [Signal a] -> Signal a
There doesn't seem to be anything in the docs, nor is there anything that I could recognize as a building block therefor.
Edit: except for maybe this:
unionSignal :: a -> Signal a -> Signal a -> SignalGen p (Signal a)
unionSignal initial a b = do
(s,f) <- execute $ external initial
_ <- effectful1 f a
_ <- effectful1 f b
return s
But ... that is just ugly and doesn't capture the idea of union
.