minus method

KtList<T> minus(
  1. KtIterable<T> elements
)

Returns a list containing all elements of the original collection except the elements contained in the given elements collection.

Implementation

KtList<T> minus(KtIterable<T> elements) {
  if (this is KtCollection && (this as KtCollection).isEmpty()) {
    return toList();
  }
  return filterNot((it) => KtIterableExtensions(elements).contains(it));
}