title: Refactoring do notation into applicative style
body: <p>So I have been working on a simple expression solver in Haskell. I have been trying to refactor some of my code from do notation to applicative code, mainly because I am want to learn how applicatives work. I am lonst on how to reactor this </p>
  
  <pre><code>factor :: Parser Expr
  factor = do
      char '('
      x &lt;- buildExpr
      char ')'
      return x
  &lt;|&gt; number
  &lt;|&gt; variables
  &lt;?&gt; "simple expression"
  </code></pre>
  
  <p>What would be the way to make this into an applicative style? I have tried the following but it wont type check</p>
  
  <pre><code>factor = pure buildExpr &lt;$&gt; (char '(' *&gt; buildExpr *&gt; char ')')
  </code></pre>
  
  <p>where buildExper has type Parser Expr.</p>