plusElement method

KtList<T> plusElement(
  1. T element
)

Returns a list containing all elements of the original collection and then the given element.

Implementation

KtList<T> plusElement(T element) {
  final result = mutableListOf<T>();
  result.addAll(asIterable());
  result.add(element);
  return result;
}