fromFunction
object PartialFunction { def fromFunction[X, Y](f: (X) => Y): PartialFunction[X, Y] }
fromFunction creates an anonymous partial function from a total function.