2
votes

We have an operator ?~ in Lens. We can do a & b . c ?~ d if _c is a field of b type. What should I use if b has a Maybe (type of _c) type?

1
There are at least two different semantics this could have; please clarify the question with examples (and type signatures).leftaroundabout

1 Answers

2
votes

Perhaps something like:

[Just (Just 1, 'a')] & _head . _Just . _1 ?~ 2