operator | method

List<E> operator |(
  1. Iterable<E> other
)

Returns a List containing all distinct elements from both collections.

It is not in the Kotlin collection library. But I added it because it looks useful.

Implementation

List<E> operator |(Iterable<E> other) => union(other).toList();