Create a LazyList that cycles through an iterable infinitely
Create an empty LazyList
Create a LazyList from multiple values
Create an infinite LazyList by repeatedly calling a function
Create an infinite LazyList by repeatedly applying a function
Create a LazyList from a single value
Create a LazyList of numbers from start to end (exclusive)
Create a LazyList that repeats a value n times (or infinitely if n is not provided)
// Process large datasets efficiently
const result = LazyList.range(1, 1000000)
.filter(x => x % 2 === 0)
.map(x => x * x)
.take(5)
.toArray() // [4, 16, 36, 64, 100]
Lazy list implementation for efficient deferred computation