title: How to "change" single values in large objects in elegant way?
body: <p>For example, i have</p>
  
  <pre><code>data ShipDesign = ShipDesign {
        offense :: Offense
      , defense :: Defense
      , maxHealth :: Integer
      , repairRate :: Integer
      , stealth :: Integer
      , radar :: Integer
      , speed :: Integer
      , shipType :: String
      ...
      }
  </code></pre>
  
  <p>Now i want to change the defense.
  The known way to do this is:</p>
  
  <pre><code>changeDefense :: (Defense -&gt; Defense) -&gt; ShipDesign -&gt; ShipDesign
  changeDefense fDef sd@(ShipDesign o d m rr s r sp st ...) = ShipDesign o (fDef d) m rr s r sp st ...
  </code></pre>
  
  <p>which isn't elegant. Especially in games its common to change just a few values per step. </p>
  
  <p>My Question is: is there a library, design pattern or other way to change a single value in a more elegant manner? </p>