Is there a way to create a lens that could do a similar thing to this function?
λ> :t \f -> bitraverse f f
\f -> bitraverse f f
:: (Applicative f, Bitraversable t) =>
(b -> f d) -> t b b -> f (t d d)
The specific type I'm trying to satisfy at the moment is:
something :: (Applicative f, Monad m) => (a -> f a) -> (m a, m a) -> f (m (a, a))
I've been experimenting with traverseOf
and both
from lens but can't seem to make the types line up.