title: How to declare a function that accepts a lambda?
body: <p>I read on the internet many tutorials that explained how to use lambdas with the standard library (such as <code>std::find</code>), and they all were very interesting, but I couldn't find any that explained how I can use a lambda for my own functions.</p>
  
  <p>For example:</p>
  
  <pre><code>int main()
  {
      int test = 5;
      LambdaTest([&amp;](int a) { test += a; });
  
      return EXIT_SUCCESS;
  }
  </code></pre>
  
  <p>How should I declare <code>LambdaTest</code>? What's the type of its first argument? And then, how can I call the anonymous function passing to it - for example - "10" as its argument?</p>