title: How to write a function that takes a functor as an argument
body: <p>Basically I want to do this:
  <a href="https://stackoverflow.com/questions/4764590/can-i-use-a-lambda-function-or-stdfunction-object-in-place-of-a-function-point">Can I use a lambda function or std::function object in place of a function pointer?</a></p>
  
  <p>clearly that is impossible for now for functions that expect a function pointer. However, it will work for a function that expects a functor ( I have done it before with stl's sort() function)</p>
  
  <p>However, I don't know how to write a function that takes a functor as an argument!</p>
  
  <p>Anyone?</p>