title: Using Lens in Haskell to modify values
body: <p>I find myself using this pattern often:</p>
  
  <pre><code>do
      let oldHeaders = mail ^. headers
      put $ (headers .~ (insert header value oldHeaders)) mail
  </code></pre>
  
  <p>which seems like the kind of thing Control.Lens should be able to do, but I guess I just haven't found the right operator yet. Is there a better way? Also, is there anything else I should be doing differently in this code?</p>