title: How do you use Control.Applicative to write cleaner Haskell?
body: <p>In a recent <a href="https://stackoverflow.com/questions/127190/good-haskell-coding-style-of-if-else-control-block/2096144#2096144">answer to a style question</a>, I wrote</p>
  
  <pre><code>main = untilM (isCorrect 42) (read `liftM` getLine)
  </code></pre>
  
  <p>and</p>
  
  <pre><code>isCorrect num guess =
    case compare num guess of
      EQ -&gt; putStrLn "You Win!" &gt;&gt; return True
      ...
  </code></pre>
  
  <p><a href="https://stackoverflow.com/users/17439/martijn">Martijn</a> helpfully suggested alternatives:</p>
  
  <pre><code>main = untilM (isCorrect 42) (read &lt;$&gt; getLine)
  
  EQ -&gt; True &lt;$ putStrLn "You Win!"
  </code></pre>
  
  <p>Which common patterns in Haskell code can be made clearer using abstractions from <a href="http://www.haskell.org/ghc/docs/latest/html/libraries/base-4.2.0.0/Control-Applicative.html" rel="noreferrer">Control.Applicative</a>? What are helpful rules of thumb to keep in mind for using Control.Applicative effectively?</p>