// Set class to wrap arrays var typal = require("./typal").typal; var setMixin = { constructor: function Set_constructor (set, raw) { this._items = []; if (set && set.constructor === Array) this._items = raw ? set: set.slice(0); else if(arguments.length) this._items = [].slice.call(arguments,0); }, concat: function concat (setB) { this._items.push.apply(this._items, setB._items || setB); return this; }, eq: function eq (set) { return this._items.length === set._items.length && this.subset(set); }, indexOf: function indexOf (item) { if(item && item.eq) { for(var k=0; k=0;--k) { ar[a[k]] = true; } for (var i=b.length-1;i >= 0;--i) { if (!ar[b[i]]) { a.push(b[i]); } } return a; } }); if (typeof exports !== 'undefined') exports.Set = Set;