greaterThan method

bool greaterThan(
  1. InkList otherList
)
Returns true if all the item values in the current list are greater than all the item values in the passed in list. Equivalent to calling (list1 > list2) in ink.

Implementation

bool greaterThan(InkList otherList) {
  if (isEmpty) return false;
  if (otherList.isEmpty) return true;

  // All greater
  return minItem.value > otherList.maxItem.value;
}