Emmanuel Oga
09/15/2020, 10:15 AM[1,2,3].tap { |a| a.add(4)}
and it returns [1, 2, 3, 4]
. In Kotlin it could be useufl to turn three lines into one: val x = X(); x.init(); return x
vs return X().tap { init() }
. I could implement my own tap but I wonder if there's already an existing helper for this.