Callback function inside of a prototype method

I am trying to use a callback function inside of a prototype method. When I do so I get an error message stating that the callback function is not a function.

Is what I am doing illegal?

I have a tree that I am traversing through and trying to apply the callback function to each item of the tree.

Do you have some code we can see?