Am I missing an obvious reason why there's a mapNotNull but no associateNotNull?
m
Manuel Wrage
07/29/2020, 11:55 PM
I guess because
associateNotNull
wouldn't be used often.
n
Nir
07/29/2020, 11:57 PM
Off the top of my head, I don't see an obvious reason why it would be used more or less than mapNotNull
Nir
07/29/2020, 11:57 PM
You can achieve both by chaining from filter, of course
Nir
07/29/2020, 11:58 PM
coming from python, mapNotNull and associateNotNull are basically the closest things to list and dict comprehensions, since you can both filter and apply a function in comprehensions
Nir
07/29/2020, 11:58 PM
and I used filtering in dict comprehensions quite often