The _Just prism will get you the value out of a Maybe.
a ^? getB . _Just . getC
0
votes
Or you can use Maybe's Traversable instance, which gets the value inside the Just if there is one.
-- traverse :: Traversal' (Maybe a) a
a ^? getB . traverse . getC
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.OkRead more