What does a function object look like if it has a number of parameters?
<p>I have created a very simple <code>Tree</code> implementation, and I would like to be able to pass a function object to my <code>traverse()</code> function. e.g.</p>

<pre><code>template&lt;class T&gt;
class MyTree
{
public:

    void traverse(MyFunction f) {
        traverse(root, f);
    }
private:
      MyTreeNode&lt;T&gt;* root;
      void traverse(MyTreeNode&lt;T&gt;*, MyFunction f);
};
</code></pre>

<p>The thing is, how do I declare <code>f</code> if I want to pass in some parameters as well as the node in question? ( pointers to other <code>structs</code> ). Alternatively, can anyone point me in the direction of some tutorials?</p>
