From: "John W. Long" Date: 2005-02-11T23:27:58+09:00 Subject: Re: Building a Better Functor Trans wrote: >>Interesting. So how exactly would you define a functor? >>What you have shown above seems to be an object that >>knows how to do some kind of operation using a >>user-defined method. Is this how you would define a functor? > > A good question. By standard definition, Method objects and Proc > objects are Functors. Since Ruby already has these I'm simply defining > a Functor as a "MetaMethod" for the sake of a distinction. By this I > mean an object the represents a method which can act on another method. > Function composition, represented as a 1st class object, for instance, > would also be a Functor of this sort. And a functor, by definition only handles one method? Which is why what I have written is not a functor? -- John