The Apache commons "functor" project:
"A functor is a function that can be manipulated as an object, or an object representing a single, generic function."
The Java code on the ComplexBagSumInJava page inspired searching for and finding this library.]
See also: jga = JavaGenericAlgorithms "Generic Algorithms for Java"
CategoryCollections CategoryJava QueryLanguagesForInMemoryObjects