title: Reading integers from a list
body: <p>I'm facing the following problem in Haskell:</p>
  
  <p>I want to parse such list:
  <code>["1", "2", "3"]</code> into a <code>Maybe [Int]</code>. What I can do is, using <code>readMaybe</code> from <code>Text.Read</code>, is get a <code>[Maybe Int]</code> int the following way:</p>
  
  <pre><code>parseList :: [String] -&gt; [Maybe Int]
  parseList l = map readMaybe l :: [Maybe Int]
  </code></pre>
  
  <p>I could then do:</p>
  
  <pre><code>parseListMaybe :: [String] -&gt; Maybe [Int]
  parseListMaybe l = if (any isNothing parsed) then Nothing
                     else (Just $ catMaybes parsed)
                     where parsed = parseList l
  </code></pre>
  
  <p>But this doesn't seem to me like the most elegant and precise way to solve this. I would appreciate some hints on this</p>