title: How to parse a string in haskell?
body: <p>i m not familiar with askell.</p>
  <p>i have to do this function <strong>parseChar :: Char -&gt; Parser Char</strong></p>
  <pre><code>&gt; parseChar 'a' &quot; abcd &quot;
  Just ('a', &quot;bcd&quot;)
  &gt; parseChar 'z' &quot; abcd &quot;
  Nothing
  </code></pre>
  <p>i did this function</p>
  <pre><code>type Parser r = String -&gt; Maybe (Char, String)
  parseChar :: Char -&gt; Parser Char
  parseChar x = \xs -&gt; Just(x, xs)
  </code></pre>
  <p>i dont really understand the \ and how can I take all the string except the second.</p>
  <p>Thanks!!</p>