A Clojure library providing finger tree data structures for efficient persistent collections with fast access to both ends.
data.finger-tree is a Clojure library implementing finger tree data structures, which are persistent collections optimized for efficient access to both ends and logarithmic-time indexed operations. It solves the need for immutable sequences with fast concatenation, splitting, and random access, providing ready-to-use types like double-lists and counted sorted sets.
Clojure developers building applications that require high-performance persistent data structures, especially those needing efficient sequential operations, custom collections, or sorted sets with indexed access.
Developers choose this library for its implementation of a proven academic design (Hinze and Paterson's finger trees), offering a balance of immutability, performance, and flexibility not found in Clojure's core collections, with support for custom measured trees.
Finger Tree data structure
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Double-list provides constant-time access to both left and right ends, as shown with conjl and peek operations in the README examples, enabling fast sequence manipulations.
Counted-sorted-set combines sorting with logarithmic-time nth and constant-time count, allowing efficient indexed retrieval in immutable sorted collections, demonstrated with nth and get operations.
The library includes a base finger tree implementation for building custom collections with user-defined measures, exemplified by the cost tree example using meter and split-tree functions.
Implements fully persistent collections with efficient concatenation and splitting via ft-concat and ft-split-at, aligning with Clojure's functional ethos and offering structural sharing for immutable data.
Only a basic README with examples is provided, lacking comprehensive API documentation or tutorials, which can hinder learning and debugging for complex use cases.
Finger trees are a specialized data structure with a steep conceptual curve, making them overkill for developers not versed in advanced functional programming or persistent collections.
At version 0.1.1, the library may lack stability, active maintenance, or widespread community adoption, posing risks for production deployment and long-term support.