startMappers
    :: (Serializable a, Serializable b)
    => [Resources]
    -> GroupType
    -> Closure (Mapper a b)
    -> DNA (Shell (Scatter a) (MR b))
startMappers res groupTy child = do
    (shellS,shellR) <- liftP newChan
    let clos = $(mkStaticClosure 'runMapperActor) `closureApply` child
    sendACP $ ReqSpawnGroup clos shellS res groupTy
    (gid,mbox) <- liftP (receiveChan shellR)
    msgs <- mapM unwrapMessage mbox
    case sequence msgs of
      Nothing -> error "Bad shell message"
      Just  s -> return $ assembleShellMapper gid s
startMappers
    :: (Serializable a, Serializable b)
    => [Resources]
    -> GroupType
    -> Closure (Mapper a b)
    -> DNA (Shell (Scatter a) (MR b))
startMappers res groupTy child = do
    (shellS,shellR) <- liftP newChan
    let clos = $(mkStaticClosure 'runMapperActor) `closureApply` child
    sendACP $ ReqSpawnGroup clos shellS res groupTy
    (gid,mbox) <- liftP (receiveChan shellR)
    msgs <- mapM unwrapMessage mbox
    case sequence msgs of
      Nothing -> error "Bad shell message"
      Just  s -> return $ assembleShellMapper gid s
startMappers res groupTy child = do
    (shellS,shellR) <- liftP newChan
    let clos = $(mkStaticClosure 'runMapperActor) `closureApply` child
    sendACP $ ReqSpawnGroup clos shellS res groupTy
    (gid,mbox) <- liftP (receiveChan shellR)
    msgs <- mapM unwrapMessage mbox
    case sequence msgs of
      Nothing -> error "Bad shell message"
      Just  s -> return $ assembleShellMapper gid s