-
Notifications
You must be signed in to change notification settings - Fork 0
mergeAll
Subhajit Sahu edited this page Jun 19, 2020
·
1 revision
Merge values from sorted arrays.
Similar: [merge], mergeAll, [rangedMerge].
function mergeAll(xs, fc, fm)
// xs: arrays
// fc: compare function (a, b)
// fm: map function (v, i, x)
const xsortedArray = require('extra-sorted-array');
var x = [10, 20, 20, 40, 40, 80];
var y = [20, 50, 70];
var z = [30, 60, 90];
xsortedArray.mergeAll([x, y, z]);
// → [ 10, 20, 20, 20, 30, 40, 40, 50, 60, 70, 80, 90 ]