contains method

bool contains(
  1. InkList otherList
)
Returns true if the current list contains all the items that are in the list that is passed in. Equivalent to calling (list1 ? list2) in ink. Other list.

Implementation

bool contains(InkList otherList) {
  if (otherList.isEmpty || isEmpty) return false;
  for (var kv in otherList.entries) {
    if (!containsKey(kv.key)) {
      return false;
    }
  }
  return true;
}