is there some way to do `filterNotNull().filter { ...
# getting-started
y
is there some way to do
filterNotNull().filter { //… }
with one function?
s
Does
.mapNotNull { … }
let you do what you want?
y
it does! thanks.\
🎉 1
🐕 1
r
Surely just doing a null check in the filter block will do the same?
s
@Robert Williams the disadvantage there is the result is still a
List<T?>
, not a
List<T>
☝️ 2
r
Ah yeah, different return type
c
But overloading the extension function to also take a predicate shouldn’t be an issue