I need a function like <<%~ that will act with Traversal same way ^? , eg:
(<<?%~) :: Traversal stab -> (a -> b) -> s -> (Maybe a, t) > ix 0 <<?%~ succ $ [1,2] (Just 1,[2,2]) > ix 1 <<?%~ succ $ [1,2] (Just 2,[1,3]) > ix 2 <<?%~ succ $ [1,2] (Nothing,[1,2])
How do I implement it? The obvious way is to use ^? and %~ individually, but I would like to solve one solution.
source share