title: Lambda expression java 8 map method
body: <p>The syntax of map method in java 8 is :</p>
  
  <pre><code>&lt;R&gt; Stream&lt;R&gt; map(Function&lt;? super T,? extends R&gt; mapper)
  </code></pre>
  
  <p>but i can use a lambda expression :</p>
  
  <pre><code>personList.stream().filter(p -&gt; p.getPersonType().equals("student"))
              .map(p -&gt; new Student(p.getId(), p.getName()))
              .collect(Collectors.toList());
  </code></pre>
  
  <p>How does the argument in map method equates to a Function datatype.Please help me understand this .</p>
  
  <p>Thanks</p>