Nate Ebel
1 min readNov 28, 2017

--

The need for the extra ? here make me wish there was something along the lines of takeIfNotNull(predicate, action)… just something to make it clear the action is only called if the predicate is non-null. Could see myself wrapping takeIf with my own function if I ever need it.

The first example there is a subtle gotcha for sure

--

--

Nate Ebel
Nate Ebel

Written by Nate Ebel

Building great software and helping others do the same.

Responses (1)