Skip to content
Subhajit Sahu edited this page Dec 28, 2022 · 13 revisions

Get lists without its first entry (default order).

Similar: head, tail.


function tail(x)
// x: lists
const xlists = require('extra-lists');

var x = [['a', 'b', 'c'], [1, 2, 3]];
xlists.tail(x).map(c => [...c]);
// → [ [ 'b', 'c' ], [ 2, 3 ] ]

var x = [['a'], [1]];
xlists.tail(x).map(c => [...c]);
// → [ [], [] ]


References