public inline fun <A, B, Z> A?.zip(b: B?, fn: (A, B) -> Z): Z?
i’m quite sure arrow devs have a good reason behind this..?
s
simon.vergauwen
08/31/2021, 12:10 PM
The problem here is that any extension on
A?
is available everywhere.
So it conflicts with all other
zip
methods.
That’s the reason why “nullable” is the exception. Any extension on it conflicts with all other extension functions with the same name in the same package.
🙀 1
simon.vergauwen
08/31/2021, 12:10 PM
Originally we had
A?.zip
, but that conflicted with
Either#zip
,
Option#zip
etc
m
mitch
08/31/2021, 12:12 PM
right that totally makes sense! thanks @simon.vergauwen 🙌