greaterThanOrEquals method

bool greaterThanOrEquals(
  1. InkList otherList
)
Returns true if the item values in the current list overlap or are all greater than the item values in the passed in list. None of the item values in the current list must fall below the item values in the passed in list. Equivalent to (list1 >= list2) in ink, or LIST_MIN(list1) >= LIST_MIN(list2) && LIST_MAX(list1) >= LIST_MAX(list2).

Implementation

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

  return minItem.value >= otherList.minItem.value &&
      maxItem.value >= otherList.maxItem.value;
}