-
Notifications
You must be signed in to change notification settings - Fork 0
head
Subhajit Sahu edited this page Dec 28, 2022
·
14 revisions
Get first entry from lists (default order).
function head(x, ed)
// x: lists
// ed: default entry
const xlists = require('extra-lists');
var x = [['a', 'b', 'c'], [1, 2, 3]];
xlists.head(x);
// → [ 'a', 1 ]
var x = [[], []];
xlists.head(x, ['', -1]);
// → [ '', -1 ]