title: how lambda works specifically in the case illustrated in the code below
body: <p>i'm new to using lambda in cpp. Can anyone elaborate how lambda is getting called in this case particularly. As a matter of fact i got this as a solution to  better understand lambda by my prof.</p>
  
  <pre><code>std::function&lt;int(int)&gt; ptr=[](int num)-&gt;int {return num+100;};
  int rval=ptr(10);
  cout&lt;&lt;rval;
  </code></pre>