Derek Peirce
04/28/2024, 12:49 AM+
operator, should there be a way to implement a more efficient multi-plus method? Such as operator fun <E> Set<E>.plusAll(vararg others: Iterable<E>): Set<E>
? Currently, setA + setB + setC
will first create an intermediate setAB
set, so one must use something like:
buildSet {
addAll(setA)
addAll(setB)
addAll(setC)
}
to avoid the inefficiency, which is a fair bit more code to achieve the same result.