Lets say I have a class C with some methods
def class C {
def f1():Int = ...
def f2():Int = ...
}
Now I'd like a method that takes two instances of C, as well as a method of C, but I don't know what the types of f1, f2 are, nor how to invoke them. I'm thinking it would look something like
def cmp(first:C, second:C, t:() => Int): Boolean = {
first.t < second.t
}
This complains that t is not a method of C. Surely there must be a way to express this.