title: How to delete "Just" in Maybe String or Maybe Int in Haskell
body: <p>i am new to haskell and in need of a little help with a problem. I have a XML file and i want to parse two things in it. One is a pair of numbers, and the second is just a letter. I use two functions to parse each element, and the result of that functions has to be "Maybe String", or else it won't work.</p>
  
  <p>The problem is, that when i display the result it allways has a "Just" attached to it. So if i want to display something like <strong>(1,2)</strong> and <strong>B</strong></p>
  
  <p>I will have <strong>(Just "1", Just "2")</strong> and <strong>Just "B"</strong></p>
  
  <p>For the numbers i got the solution. I have made this function to work with the list i get from the parse of the pairs:</p>
  
  <pre><code>pair:: [(Maybe String, Maybe String)] -&gt; [(Int, Int)]
  pair [] = []
  pair ((Just x, Just y) : ls) = (read x, read y) : pair ls
  </code></pre>
  
  <p>It works fine. But i tried to do the same for the list with the letters and it doesn't work.</p>
  
  <p>here is my code:</p>
  
  <pre><code>letter :: [Maybe String] -&gt; [Char]
  letter [] = []
  letter (Just x : ls) = read x : letter ls
  </code></pre>
  
  <p>When i run this, i get the list of pairs right and this error</p>
  
  <pre><code>myfile.hs: Prelude.read: no parse
  </code></pre>
  
  <p>Why is this happening? Is the read function the problem?</p>