tail - nodef/extra-lists GitHub Wiki

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](/nodef/extra-lists/wiki/'a',-'b',-'c'],-[1,-2,-3);
xlists.tail(x).map(c => [...c]);
// → [ [ 'b', 'c' ], [ 2, 3 ] ]

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

References