LeoColman
04/03/2022, 4:51 PMfun insertAll(uses: Iterable<Use>) {
uses.forEach { insert(it) }
uses.forEach(::insert)
}
What do you think about both approaches?ephemient
04/03/2022, 5:05 PMephemient
04/03/2022, 5:07 PM{ insert(it) } != { insert(it) }
which makes it easy for the compiler to create a wrapper, but ::insert == ::insert
which means the compiler has to do some more work to produce a stable referenceephemient
04/03/2022, 5:08 PM