qq, i noticed that Nullables have `Nullable.zip` ...
# arrow
m
qq, i noticed that Nullables have
Nullable.zip
but it doesn’t have the extension function
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
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
Originally we had
A?.zip
, but that conflicted with
Either#zip
,
Option#zip
etc
m
right that totally makes sense! thanks @simon.vergauwen 🙌
🙌 1