hey gents, regarding list/set/sequence extension f...
# stdlib
g
hey gents, regarding list/set/sequence extension functions, is there a discussion about including those same extension functions that take custom equality comparators? EG:
Copy code
public infix fun <T> Iterable<T>.intersect(other: Iterable<T>): Set<T> {
    val set = this.toMutableSet()
    set.retainAll(other)
    return set
}

public fun <T, C> Iterable<T>.intersect(other: Iterable<T>, comparator: (T, T) -> Boolean) { //...
i
This overload can be implemented with set, so it would have different performance characteristics: O(m*n) instead of O(m+n)
g
I dont think most users of the std-lib are too concerned with performance, and if they are, I really dont think that the idea that you get different performance characteristics based on whether or not you use a custom equality comparator would be surprising.