Method code for $list.set_contains()

[Turn off line numbering]
  1: arg @args;
  2: var super, list, element;
  3: 
  4: // True if the first list given is a superset of all subsequent lists.
  5: // False otherwise.  [] is a superset of [] and nothing else; anything is
  6: // a superset of [].  If only one list is given, return true.
  7: super = args ? args[1] : [];
  8: for list in (delete(args, 1)) {
  9:     for element in (list) {
 10:         if (!(element in super))
 11:             return 0;
 12:     }
 13: }
 14: return 1;

// Created 27-Mar-1995 as a part of ColdCore, see: @help Credit

Tlon