title: How to compose lenses that return Maybe (Haskell)
body: <p>Suppose I have a lens like <code>at _</code> that needs some <code>Maybe a</code>:</p>
  
  <pre><code>import Data.Map as M
  m = M.fromList [(1,(2,3))]
  --set 2nd element
  m ^. at 1 .~ Just (4,5) 
  --gives fromList [(1,(4,5))]
  m ^. at 1 .~ Nothing
  --gives fromList ()
  </code></pre>
  
  <p>Now suppose I want to compose it with another lens. The fact that this lens returns some <code>Maybe a</code> prevents me from doing it directly.</p>
  
  <pre><code>m ^. at 1 . _2 .~ Just 4
  --error
  -- I want to get M.fromList [(1,(2,4))]
  </code></pre>
  
  <p>What's the right way to do this?</p>