''From FunctorObject:'' Here's a stripped down version of a C++ implementation: -- PhilGoodwin ''This declares an interface for functors that is used by clients. Other versions of this interface include parameter types and return values'' struct Functor { virtual void operator()()=0; }; ''This declares an adaptor that turns an object/method pair into a Functor that can be passed to a client'' template< typename Type_ > class Functor''''''For: public Functor { public: typedef void(Type_::*Member''''''Function)(); private: Type_ *theInstance; Member''''''Function theMethod; public: Functor''''''For(Type_ *anInstance, Member''''''Function aMethod): theInstance(anInstance), theMethod(aMethod){} void operator()() { (theInstance->*theMethod)(); } }; '' This declares an adaptor for normal function pointers It doesn't actually '''do''' anything except add type safety'' class Function''''''Functor: public Functor { public: typedef void(*Function''''''Type)(); private: Function theFunction; public: Function''''''Functor(Function''''''Type aFunction): theFunction(aFunction){} void operator() () { theFunction(); } }; Here are a couple of snippets that show how to add parameter and return types: template< typename Return''''''Type, typename Parameter''''''Type > struct FunctorR1 { Return''''''Type operator() (Parameter''''''Type)=0; }; template< typename Type_, typename Return''''''Type, typename Parameter''''''Type > class FunctorR1For: class FunctorR1 { ... typedef Return''''''Type(Type_::*Member''''''Function)(Parameter''''''Type); ... Return''''''Type operator() (Parameter''''''Type param) { return (theInstance->*theMethod(param); } }; ---- See BlocksInJava for an example in the JavaLanguage