-- | Send parameter to the group of actors. A slicing function can
-- modify the data sent to each node.
broadcastParamSlice :: Serializable a
                    => (Int -> [a]) -> Shell (Scatter a) b -> DNA ()
broadcastParamSlice slice (Shell _ (RecvGrp chans) _) = do
    zipWithM_ (\a ch -> liftP $ sendChan ch a)
      (slice (length chans))
      chans


-- | Connect output of one shell process to input of another.
broadcastParamSlice :: Serializable a
                    => (Int -> [a]) -> Shell (Scatter a) b -> DNA ()
broadcastParamSlice slice (Shell _ (RecvGrp chans) _) = do
    zipWithM_ (\a ch -> liftP $ sendChan ch a)
      (slice (length chans))
      chans


-- | Connect output of one shell process to input of another.
broadcastParamSlice slice (Shell _ (RecvGrp chans) _) = do
    zipWithM_ (\a ch -> liftP $ sendChan ch a)
      (slice (length chans))
      chans


-- | Connect output of one shell process to input of another.