title: How to get the value of a Maybe in Haskell
body: <p>I'm relatively new to Haskell and began to read "Real World Haskell".</p>
  
  <p>I Just stumbled over the type Maybe and have a question about how to receive the actual value from a <code>Just 1</code> for example.</p>
  
  <p>I have written the following code:</p>
  
  <pre><code>combine a b c = (eliminate a, eliminate b, eliminate c)
                  where eliminate (Just a) = a
                        eliminate Nothing = 0
  </code></pre>
  
  <p>This works fine if I use:</p>
  
  <pre><code>combine (Just 1) Nothing (Just 2)
  </code></pre>
  
  <p>But if I change, for example, 1 to a String it doesn't work.</p>
  
  <p>I think I know why: because <code>eliminate</code> has to give back one type, which is, in this case, an <code>Int</code>. But how can I change <code>eliminate</code> to deal at least with Strings (or maybe with all kind of types)?</p>