Counts the number of elements in the tree.
to count elements.
The number of elements in the tree.
const emptiness = empty;const single = fromArray([3]);const many = fromArray([2, 1, 8, 1, 8]);expect(size(emptiness)).toStrictEqual(0);expect(size(single)).toStrictEqual(1);expect(size(many)).toStrictEqual(5); Copy
const emptiness = empty;const single = fromArray([3]);const many = fromArray([2, 1, 8, 1, 8]);expect(size(emptiness)).toStrictEqual(0);expect(size(single)).toStrictEqual(1);expect(size(many)).toStrictEqual(5);
Counts the number of elements in the tree.