I thought it would be an interesting experiment to compare the generation of primes, lazily, in both Haskell and Idris. Haskell has lazy evaluation by default, and Idris does support it via the Lazy and Force primitives, and infinite data structuresusing Streams etc. Here is the code in Haskell (adapted from Graham Hutton’s book, “Programming … Continue reading Lazy primes in Idris| Talking with a Lisp