I'm trying to do the following:
val divide: PartialFunction[(Int, Int), Int] = {
case (x, y) if (y != 0) => x / y
}
val divide42 = (y: Int) => divide((42, y))
However:
divide42.isDefinedAt(0)
cmd18.sc:1: value isDefinedAt is not a member of Int => Int
val res18 = divide42.isDefinedAt(0)
^Compilation Failed
What is the right way to preserve PartialFunction functionality when going from PartialFunction to partially applied function?