*
{Array} [quantity1]
{Array} [quantity2],
...
{Array} [quantityN],
@return {Array}
171040
function () {
            var ret = [],
                quantities = Array.prototype.slice.call(arguments);

            if (quantities.length === 1) {
                return quantities[0];
            }

            if (quantities.length > 0) {
                var baseQuantity = quantities[0];

                for (var i = 0; i < baseQuantity.length; i++) {
                    var item = baseQuantity[i],
                        found = true;

                    for (var j = 1; j < quantities.length; j++) {
                        if (!_.contains(quantities[j], item)) {
                            found = false;
                            break;
                        }
                    }

                    if (found) {
                        ret.push(item);
                    }
                }
            }


            return ret;
        }
1295896
function() {
        return this.set(
			this.matrix[0][0], this.matrix[1][0], this.matrix[2][0], this.matrix[3][0],
			this.matrix[0][1], this.matrix[1][1], this.matrix[2][1], this.matrix[3][1],
			this.matrix[0][2], this.matrix[1][2], this.matrix[2][2], this.matrix[3][2],
			this.matrix[0][3], this.matrix[1][3], this.matrix[2][3], this.matrix[3][3]
		);
	}
1275773
function multiply(out, a, b) {
  out[0] = a[0] * b[0];
  out[1] = a[1] * b[1];
  out[2] = a[2] * b[2];
  return out;
}
670153
function(a, b)
{
    return (a.l <= b.r && b.l <= a.r && a.b <= b.t && b.b <= a.t);
}
458798
function (s2) {
            var self = this;
            return !!util.reduce(self.keys, function (v, k) {
                return v && self[k] === s2[k];
            }, 1);
        }
711706
function(a, b){
			return (a._x < b._x + b._w && a._y < b._y + b._h 
					&& a._x + a._w > b._x && a._y + a._h > b._y)
		}
367244
function getDeeplyMergedValues(value1, value2) {
  if (isArray(value2)) {
    return !isArray(value1) ? value2 : mergeDeepArrays(value1, value2); // eslint-disable-line no-use-before-define
  }

  if (isObject(value2)) {
    return !isObject(value1) ? value2 : mergeDeepObjects(value1, value2); //eslint-disable-line no-use-before-define
  }

  return value2;
}
913595
public Keys<K> keys () {
		if (keys1 == null) {
			keys1 = new OrderedMapKeys(this);
			keys2 = new OrderedMapKeys(this);
		}
		if (!keys1.valid) {
			keys1.reset();
			keys1.valid = true;
			keys2.valid = false;
			return keys1;
		}
		keys2.reset();
		keys2.valid = true;
		keys1.valid = false;
		return keys2;
	}
631280
function flatten(a) {
  function _reduce(a) { return a.reduce(_flatten, []); }

  function _flatten(a, b) {
    return a.concat(Array.isArray(b) ? _reduce(b) : b);
  }

  return _reduce(a);
}
1076871
function union(arr1, arr2) {
  if (_.isEqual(arr1, arr2)) {
    return arr1;
  }

  const arr = arr1.slice();
  for (const v of arr2) {
    if (!arrayIncludes(arr, v)) {
      arr.push(v);
    }
  }

  return arr;
}
1216258
@SuppressWarnings("unchecked")
    public static <T1, T2> Tuple2<T1, T2>[] zip(T1[] arr1, T2[] arr2) {
        int resultSize = _max(arr1.length, arr2.length);
        Tuple2[] result = new Tuple2[resultSize];

        for (int i = 0; i < resultSize; i++)
            result[i] = tuple(next(arr1, i), next(arr2, i));

        return result;
    }
950946
public int[][] getVariations() {
		int permutations = (int) Math.pow(n, r);
		int[][] table = new int[permutations][r];

		for (int x = 0; x < r; x++) {
			int t2 = (int) Math.pow(n, x);
			for (int p1 = 0; p1 < permutations;) {
				for (int al = 0; al < n; al++) {
					for (int p2 = 0; p2 < t2; p2++) {
						table[p1][x] = al;
						p1++;
					}
				}
			}
		}

		return table;
	}
654289
@SuppressWarnings("JavaDoc")
    public static <_1, _2> Tuple2<_1, _2> tuple(_1 _1, _2 _2) {
        return singletonHList(_2).cons(_1);
    }
875329
function ( obj1, obj2 ) {
		var result;

		result = obj1.map( function ( i, idx ) {
			return [i, obj2[idx]];
		});

		return result;
	}
720203
function getCommonArray(array1, array2, width) {
  var newArray = [[], []];
  var pos2 = 0;
  width /= 2;
  var j = 0;
  var array1Length = array1[0] ? array1[0].length : 0;
  var array2Length = array2[0] ? array2[0].length : 0;

  for (var i = 0; i < array1Length; i++) {
    while (pos2 < array2Length && (array1[0][i] > (array2[0][pos2] + width))) {
      pos2++;
    }
    if ((pos2 < array2Length) && (array1[0][i] > array2[0][pos2] - width)) {
      newArray[0][j] = array1[0][i];
      newArray[1][j] = array1[1][i];
      j++;
    }
  }
  return newArray;
}
538779
function(v1, v2, e1, e2) {
        return !((e1 < v1 && e2 < v1) || (e1 > v2 && e2 > v2));
    }
1144780
function cart(xs, ys)
{
	// nothing on the left
	if(!xs || xs.length === 0)
		return ys.map(function(y){
			return [[],y]
		});

	// nothing on the right
	if(!ys || ys.length === 0)
		return xs.map(function(x){
			return [x,[]]
		});

	return Combinatorics.cartesianProduct(x, y).toArray();
}