Skip to content
Subhajit Sahu edited this page Dec 5, 2022 · 12 revisions

Get a map without its first entry (default order).

Similar: head, tail.


function tail(x)
// x: a map
const map = require('extra-map');

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

var x = new Map([['a', 1]]);
map.tail(x);
// → Map(0) {}


References

Clone this wiki locally