hylar/core/Logics/Logics.js
function(_set1, _set2) {
        var flagEquals,
            newSet = [];
        for (var i = 0; i < _set1.length; i++) {
            flagEquals = false;
            for(var j = 0; j < _set2.length; j++) {
                if (_set1[i].asString == _set2[j].asString) {
                    flagEquals = true;
                    break;
                }
            }
            if (!flagEquals) {
                newSet.push(_set1[i]);
            }
        }

        return newSet;
    }
function(_set1, _set2) {
        var flagEquals,
            newSet = [];
        for (var i = 0; i < _set1.length; i++) {
            flagEquals = false;
            for(var j = 0; j < _set2.length; j++) {
                if (_set1[i].asString == _set2[j].asString) {
                    flagEquals = true;
                    break;
                }
            }
            if (!flagEquals) {
                newSet.push(_set1[i]);
            }
        }

        return newSet;
    }
function ( _set1 , _set2 ) { var flagEquals , newSet = [ ] ; for ( var i = 0 ; i < _set1 . length ; i ++ ) { flagEquals = false ; for ( var j = 0 ; j < _set2 . length ; j ++ ) { if ( _set1 [ i ] . asString == _set2 [ j ] . asString ) { flagEquals = true ; break ; } } if ( ! flagEquals ) { newSet . push ( _set1 [ i ] ) ; } } return newSet ; }
Substracts each set.
Not to be used in tag-based reasoning.
@param _set1
@param _set2
@returns {Array}
Substracts each set . Not to be used in tag - based reasoning .