title: Why would one ever use lambda beyond the declaring scope or functions called from the declaring scope?
body: <p>There are several ways to pass callable objects as parameters or to store them for future use. You can create a class with <code>operator()</code>, you can define a function and pass a pointer to it, and, since C++11, you can define a lambda via <code>[](){}</code> syntax.</p>
  
  <p>I appreciate lambda syntax as a shortcut in expressions such as <code>find_if</code> that often beg for a compact callable expression. What I don't understand about lambda is the desire to use them outside the point of their declaration and risk introducing dangling references and such. C++ already has a powerful way to pass callable objects around which is much safer then lambda, and in those situation there is no benefit of compact expression of lambda.</p>
  
  <p>Thus the question: why does C++11 allow use of a lambda outside the function that declares is or the functions called from it (and therefore introduces the risk of dangling references, etc)? Could you give an example where keeping lambda live outside the declaring function would be desirable? </p>