Contents
Up
Prev
Next
Haskell for Perl Programmers
→
Infinite Lists
3. Infinite Lists
Because of its lazy evaluation, infinite (lazy) lists are possible in Haskell.
The Haskell interpreter will calculate as many elements of them as are needed.
3.1. Fibonacci with Lists
3.2. Primes (with low efficiency)
3.3. Primes (with better efficiency)
Contents
Up
Prev
Next
Written by
Shlomi Fish