Say I am simulating a network of some sort, and have a function which broadcasts a value over a list of Chans:
broadcast :: a -> [Receiver] -> IO ()
broadcast a = mapM_ (send a)
This will "send" the data to each Receiver in order. I would like instead to broadcast nondeterministically to all of the Receivers.
Thanks for any clues.