README
Picks an arbitrary submap. :package: :smiley_cat: :running: :vhs: :moon: :scroll: :newspaper: :blue_book:
This is part of package extra-lists.
lists.subset(x, [n], [r]);
// x: lists
// n: number of entries (-1 => any)
// r: random seed 0->1
const lists = require('extra-lists');
var x = [['a', 'b', 'c', 'd'], [1, 2, 3, 4]];
lists.subset(x).map(c => [...c]);
// [ [ 'b', 'c' ], [ 2, 3 ] ]
lists.subset(x, 3, 0.3).map(c => [...c]);
// [ [ 'a', 'b', 'd' ], [ 1, 2, 4 ] ]
lists.subset(x, 2, 0.3).map(c => [...c]);
// [ [ 'b', 'd' ], [ 2, 4 ] ]