public function provideFunctorTestData() { return ['Identity' => ['$f' => function ($x) { return $x + 1; }, '$g' => function ($x) { return $x + 5; }, '$x' => Identity::of(123)]]; }
/** * sequence_ :: Monad m => [m a] -> m () * * @todo consider to do it like this: foldr (>>) (return ()) * * @param Monad[] $monads * * @return Monad */ function sequence_($monads) { return reduce(sequenceM, Identity::of([]), toFoldable($monads)); }