Shouldn't ``` public operator fun <T> Iterab...
# stdlib
m
Shouldn't
Copy code
public operator fun <T> Iterable<T>.minus(element: T): List<T>
be defined with element as nullable?
Copy code
public operator fun <T> Iterable<T>.minus(element: T?): List<T>
I.e. if you call
listOf<String>(...) - null as String?
it would just return the same
List<String>
and not
List<String?>
as it currently does. 1 reply Anyone has any input on this idea? I think such a change could be implemented without breaking any code using
minus
currently. It could even be changed to
element: Any?
, but I'm not sure this would be very useful.