voddan
01/03/2017, 8:19 AMinitOnce
property delegate)voddan
01/03/2017, 8:20 AMstepango
01/06/2017, 9:21 PMkirillrakhman
01/06/2017, 9:21 PMT == T: Any?
damian
01/06/2017, 9:41 PM<T : Any>
, but can be for <T>
robin
01/12/2017, 12:49 PMmeasureNanoTime
and measureTimeMillis
?vmironov
01/12/2017, 12:51 PMSystem.currentTimeMillis()
and System.nanoTime()
ilya.gorbunov
01/13/2017, 10:55 PMapply
but operates on it
instead of this
inside it's lambda.
Our two shortlisted candidates are btw
and also
.
The function is designated to be used in a situation when you need to perform a side-effect on some value, before passing it somewhere else. For example:
1️⃣ val result = getSomeValue().btw { do_something_with(it) }
2️⃣ val result = getSomeValue().also { do_something_with(it) }
What do you think guys, which of these names fits better for K?jkwatson
01/13/2017, 10:57 PM.then
?jw
01/13/2017, 10:57 PMthen
, andThen
, or just and
jkwatson
01/13/2017, 10:57 PMbtw
is terrible, btw.fellshard
01/13/2017, 10:57 PMthenDo
?fellshard
01/13/2017, 10:57 PMdo
pushes the 'effect occurs here' sidecedric
01/13/2017, 11:00 PMaffect
?cedric
01/13/2017, 11:00 PMcedric
01/13/2017, 11:00 PMmodify
?jkwatson
01/13/2017, 11:01 PMmap
cedric
01/13/2017, 11:01 PMadjust
cedric
01/13/2017, 11:02 PMmap
to me doesn’t perform side effectsjkwatson
01/13/2017, 11:03 PMjkwatson
01/13/2017, 11:03 PMdo_something_with(it)
as the result
jkwatson
01/13/2017, 11:03 PMcedric
01/13/2017, 11:03 PMexecute
jw
01/13/2017, 11:04 PMonEach
for side-effects and takes a (T) -> Unit
. Maybe on
?ilya.gorbunov
01/14/2017, 12:38 AMilya.gorbunov
01/14/2017, 12:40 AMon
and then
. And and
is a bitwise operatorromainguy
01/14/2017, 3:47 AMnimtiazm
01/14/2017, 9:38 AMjw
01/14/2017, 10:30 AMilya.gorbunov
01/14/2017, 2:58 PM