Fun-Tors: Creating and Applying Functors

According to the Merriam-Webster Online Dictionary, a functor is "something that performs a function or an operation." From a programming point of view, a functor is a function that can be passed as a parameter and manipulated like other values. Many languages, such as C, have function pointers that hold the actual memory address of a function. In these languages, you can pass a function to another function and then apply it to different arguments. You can use this to apply a function to each member ...

Get Wicked Cool Java now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.