An immutable list of elements
Implementation of an immutable empty list
Implementation of an immutable list of length 1 (one)
Implementation of an immutable list of arbitrary length, implemented as a binary tree
This package contains an implementation of persistent immutable arrays.
("Persistent" seems to have acquired a new meaning. It no longer refers to values that outlive the execution of the program that created them, but now refers to data structures where modification actions leave the existing value unchanged.)
The first version of this package (released with Saxon 220.127.116.11) took code from the PCollections library at https://github.com/hrldcpr/pcollections. In 18.104.22.168 this has been replaced by a home-brew implementation written entirely by Saxonica.
The implementation uses a simple binary tree, in which the left-hand half of the array is in one subtree, and the right-hand half in the other. The tree is kept balanced as necessary. There are two special-case implementations for empty and singleton trees.
Copyright (c) 2004-2021 Saxonica Limited. All rights reserved.