A fast immutable list data structure for JavaScript with a comprehensive functional API and seamless Ramda integration.
List is a fast, immutable list data structure for JavaScript that serves as a purely functional alternative to native arrays. It solves the problem of accidental mutations in functional programming by providing a persistent sequence with optimized performance for operations like map, filter, and reduce. The library offers a comprehensive functional API, seamless integration with Ramda, and support for multiple coding styles including curried functions and chainable methods.
JavaScript and TypeScript developers practicing functional programming, especially those using libraries like Ramda or seeking immutable data structures for safer state management. It's also suitable for performance-sensitive applications where functional operations on sequences are frequent.
Developers choose List over native arrays or other immutable libraries because it combines immutability with high performance, a familiar functional API, and excellent tree-shaking support. Its seamless Ramda integration allows easy adoption for existing Ramda users, while its focus on being a single, optimized data structure ensures reliability and efficiency.
🐆 An immutable list with unmatched performance and a comprehensive functional API.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Guarantees no accidental mutations, making state predictable in functional code—the README emphasizes this prevents bugs from imperative temptations.
Uses relaxed radix balanced trees for persistent operations, with benchmarks showing it often outperforms native arrays in functional use cases like map and filter.
Offers chainable methods, curried functions, and plain imports, catering to different coding preferences while maintaining TypeScript support.
Implements 61 out of 76 Ramda array functions, allowing easy migration for existing Ramda users without API changes.
Missing 15 Ramda functions like `uniq` and `transpose`, which may force users to implement workarounds or stick with arrays for those operations.
Requires explicit `toArray` and `from` calls for interoperability with native arrays, adding extra steps in mixed codebases.
The immutable, functional API and concepts like Fantasy Land can be overwhelming for developers accustomed to imperative JavaScript, slowing adoption.
Persistent data structures can increase memory usage for large lists compared to mutable arrays, though the README doesn't address this trade-off directly.