MonadZip
A trait for zipping Monads, typically container monads like List
.
A minimal implementation must define zipWith
and zipWithA
.
Signatures
Returns single monad where the element (or elements) of ma
and mb
are combined
with the function f
.
def zipWithA(f: a -> (b -> f[c] \ ef), ma: m[a], mb: m[b]): f[m[c]] \ ef with MonadZip[m], Applicative[f]
SourceGeneralized version of zipWith
where f
zips an applicative functor across the
(monadic) containers ma
and mb
.
Trait Definitions
Returns a pair of monads, the first containing the element (or elements) of the left part of mx
the second containing the element (or elements) of the right part of mx
.