Using anonymous functions and function members.

This is too slow.  Will need to compile-in particular the member functions for particular combinations.