Nir
12/12/2020, 8:16 PMoperator fun<R> R.rem(transform: (R) -> R) = transform(this)
operator fun<R> R.rem(transform: R.() -> R) = this.transform()
I'm not even allowed to declare bothRob Elliot
12/12/2020, 8:39 PMNir
12/12/2020, 10:08 PMNir
12/12/2020, 10:09 PMephemient
12/13/2020, 12:05 AMephemient
12/13/2020, 12:06 AM(R) -> (R) to a function taking a (R).() -> (R) and vice versaephemient
12/13/2020, 12:16 AMExtension function typeis now just a shorthand forT.(P) -> R.@ExtensionFunctionType Function2<T, P, R>is a type annotation defined in built-ins. So effectively functions and extension functions now have the same type, which means that everything which takes a function will work with an extension function and vice versa.kotlin.extension
ephemient
12/13/2020, 12:17 AMNir
12/13/2020, 12:19 AMNir
12/13/2020, 12:21 AMas operator.Nir
12/13/2020, 12:21 AMNir
12/13/2020, 12:21 AMephemient
12/13/2020, 12:25 AM{ -> } lambda in-place, it always takes the declared shapeephemient
12/13/2020, 12:27 AMthis receiver or taking an implicit receiver it?" otherwiseNir
12/13/2020, 12:28 AMNir
12/13/2020, 12:28 AMNir
12/13/2020, 12:30 AMNir
12/13/2020, 12:30 AMNir
12/13/2020, 12:30 AMNir
12/13/2020, 12:31 AMAnimesh Sahu
12/13/2020, 3:02 AMAnimesh Sahu
12/13/2020, 3:03 AMlambda = { a -> } as instance.lambda() back in the days, not now but they are still the same in the bytecode level I guess.