title: How to write a case Maybe statement using where
body: <p>In Haskell, I am trying to write something like</p>
  <pre><code>function x = do
      y &lt;- get x
      put y
      let z = Map.lookup y
      case y of 
        Nothing -&gt; Nothing
        Just y -&gt; do... (something)
  </code></pre>
  <p>I want to replace the &quot;let..case of&quot; block with something like a &quot;where..case of&quot; block or &quot;where&quot; block if possible. How can I do so?</p>