map2<A extends Object, B extends Object, C extends Object> function
Combines to nullable values a
and b
using a binary function f
.
If either nullable value is null, the result is null.
Implementation
C? map2<A extends Object, B extends Object, C extends Object>(
A? a,
B? b,
Func2<A, B, C?> f,
) {
if (a == null || b == null) return null;
return f(a, b);
}