CovariantFunctor for CompositionClass
This commit is contained in:
parent
4d1202d399
commit
a691f6d8b7
@ -166,3 +166,14 @@ impl<U: SharedFunctor + Functor, V: SharedFunctor> SharedFunctor for Composition
|
|||||||
U::fmap(V::unshare, U::unshare(sa))
|
U::fmap(V::unshare, U::unshare(sa))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl<U: CovariantFunctor + Functor, V: CovariantFunctor> CovariantFunctor
|
||||||
|
for CompositionClass<U, V>
|
||||||
|
{
|
||||||
|
fn variate<'a: 'b, 'b, A: 'a>(fa: Self::F<'a, A>) -> Self::F<'b, A>
|
||||||
|
where
|
||||||
|
Self: 'a,
|
||||||
|
{
|
||||||
|
U::fmap(V::variate, U::variate(fa))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user