collections.js
function EnumSet(iter) {
    var p = {};
    priv.set(this, p);
    var newIter = iter;
    if (Array.isArray(iter)) {
      newIter = Array.prototype.map.call(iter, function(x) {
        return [x, x];
      });
    } else if(iter && typeof iter.entries === 'function') {
      if (iter instanceof EnumMap) {
        newIter = {
          entries: function() {
            var pi = priv.get(iter);
            return new Iterator(pi.sequence.sequence, undefined, function(x) {
              return [x, x];
            });
          }
        };
      }
    }
    p.sequence = new Sequence(newIter);
  }
function EnumSet(iter) {
    var p = {};
    priv.set(this, p);
    var newIter = iter;
    if (Array.isArray(iter)) {
      newIter = Array.prototype.map.call(iter, function(x) {
        return [x, x];
      });
    } else if(iter && typeof iter.entries === 'function') {
      if (iter instanceof EnumMap) {
        newIter = {
          entries: function() {
            var pi = priv.get(iter);
            return new Iterator(pi.sequence.sequence, undefined, function(x) {
              return [x, x];
            });
          }
        };
      }
    }
    p.sequence = new Sequence(newIter);
  }
function EnumSet ( iter ) { var p = { } ; priv . set ( this , p ) ; var newIter = iter ; if ( Array . isArray ( iter ) ) { newIter = Array . prototype . map . call ( iter , function ( x ) { return [ x , x ] ; } ) ; } else if ( iter && typeof iter . entries === 'function' ) { if ( iter instanceof EnumMap ) { newIter = { entries : function ( ) { var pi = priv . get ( iter ) ; return new Iterator ( pi . sequence . sequence , undefined , function ( x ) { return [ x , x ] ; } ) ; } } ; } } p . sequence = new Sequence ( newIter ) ; }
This is our poly-filled Set, which we can enumerate using Sequence
This is our poly - filled Set which we can enumerate using Sequence