-
Notifications
You must be signed in to change notification settings - Fork 1
isDisjoint
wolfram77 edited this page Mar 31, 2020
·
25 revisions
Checks if iterables have no value in common.
iterable.isDisjoint(x, y, [fn]);
// x: an iterable
// y: another iterable
// fn: compare function (a, b)
const iterable = require('extra-iterable');
var x = [1, 2, 3, 4];
iterable.isDisjoint(x, [2, 5]);
// false
iterable.isDisjoint(x, [-2, -5]);
// true
iterable.isDisjoint(x, [-2, -5], (a, b) => Math.abs(a) - Math.abs(b));
// false