I have several functions with same input and output types initialized in an object
object Utils {
def f1(value: Int): Double = ???
def f2(value: Int): Double = ???
def f3(value: Int): Double = ???
}
I have a list of higher order values for those functions:
val x = List(Utils.f1, Utils.f2)
How can I use pattern matching to check which functions of those declared in the object are contained in x? I would like to obtain something similar to the following code:
x(0) match {
case Utils.f1 => ...
case Utils.f2 => ...
}