union method

InkList union(
  1. InkList otherList
)
Returns a new list that is the combination of the current list and one that's passed in. Equivalent to calling (list1 + list2) in ink.

Implementation

InkList union(InkList otherList) {
  var union = InkList.of(this);
  union.addAll(otherList);

  return union;
}