UNPKG

sonic-forest

Version:

High-performance (binary) tree and sorted map implementation (AVL, Splay, Radix, Red-Black)

14 lines (13 loc) 293 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.first = void 0; const first = (root) => { let curr = root; while (curr) if (curr.l) curr = curr.l; else return curr; return curr; }; exports.first = first;