let f: ((Int) -> Int)? = { $0 * 2 } transform(10, with: f) // → 20 // Using optional overload