title: When and why should one use Applicative Functors in Scala
body: <p>I know that <code>Monad</code> can be expressed in Scala as follows:</p>
  
  <pre><code>trait Monad[F[_]] {
    def flatMap[A, B](f: A =&gt; F[B]): F[A] =&gt; F[B]
  }
  </code></pre>
  
  <p>I see why it is useful. For example, given two functions:</p>
  
  <pre><code>getUserById(userId: Int): Option[User] = ...
  getPhone(user: User): Option[Phone] = ...
  </code></pre>
  
  <p>I can easily write function <code>getPhoneByUserId(userId: Int)</code> since <code>Option</code> is a monad:</p>
  
  <pre><code>def getPhoneByUserId(userId: Int): Option[Phone] = 
    getUserById(userId).flatMap(user =&gt; getPhone(user))
  </code></pre>
  
  <p>...</p>
  
  <p>Now I see <code>Applicative Functor</code> in Scala:</p>
  
  <pre><code>trait Applicative[F[_]] {
    def apply[A, B](f: F[A =&gt; B]): F[A] =&gt; F[B]
  }
  </code></pre>
  
  <p>I wonder when I should use it <em>instead of</em> monad . I guess both Option and List are <code>Applicatives</code>. Could you give simple examples of using <code>apply</code> with Option and List and explain <em>why</em> I should use it <em>instead of</em> <code>flatMap</code> ?</p>