-
Notifications
You must be signed in to change notification settings - Fork 5
union$
Subhajit Sahu edited this page Mar 17, 2020
·
29 revisions
Gives union of first array with another.
array.union$(x, y, [fn]);
// x: an array (updated)
// y: another array
// fn: compare function (a, b)
const array = require('extra-array');
array.unfoldr(v => v===0? undefined : [v, v-1], 10);
// [ 10, 9, 8, 7, 6, 5, 4, 3, 2, 1 ]