arekolek
08/11/2017, 7:56 AMArray.forEach that passes each element as this instead of it?stefano.maffullo
08/11/2017, 8:00 AMarekolek
08/11/2017, 8:01 AMit from outer scope without using labels or explicit parameter namesarekolek
08/11/2017, 8:02 AMit from forEacharekolek
08/11/2017, 8:04 AMfoo.run { bar.forEach { it.baz = this } }arekolek
08/11/2017, 8:04 AMfoo.let { bar.forEach { baz = it } }menegatti
08/11/2017, 8:18 AMarekolek
08/11/2017, 8:22 AMlet { run { baz = it } } feels more natural in my case.arekolek
08/11/2017, 8:23 AMmenegatti
08/11/2017, 8:26 AMit being shadowed, I usually go with the named parameter as it helps reading later... but I can always back the "let's see if it's possible" spirit 😄