Infinite Sequences

Back to Lazy Evaluation

Data structures that conceptually contain infinitely many elements but only compute elements on demand. Lazy evaluation makes infinite sequences practical — only the consumed portion is ever computed, enabling elegant solutions like Fibonacci sequences and prime sieves.

programming-paradigms functional lazy infinite