title: map on a scala List/Seq
body: <p>I have the below simple code</p>
  
  <pre><code>private def tt(l:Seq[Int]):Seq[Future[Unit]] = {
      val aa = l.map(_=&gt;Future.successful(()))
      aa
    }
  </code></pre>
  
  <p>I can easily grasp the fact that I am returning <code>Future[Unit] type corresponding to each element of my sequence "l" that is passed to method tt.</code> It is easy to say that <code>"aa"</code> is of type <code>Seq[Future[Unit]]</code> as a consequence. What I am unable to get my head around is that when my "l", the sequence is of length zero, map will never be executed, why and how even then am I able to get Seq[Future[Unit]]because I have explicitly put the return type and clearly scala is happy that no matter what is "l" even if empty, "aa' will still result with Seq[Future[Unit]]. But I fail to get why</p>