Note the explicit return type on the f1ToO function, which is needed to avoid an error indicating that recursive functions need a return type!
Unfortunately, this approach fails because there are two implicit conversions in Predef.
This problem can be resolved by explicitly specifying the desired final type