Quantcast
Channel: double stream feed to prevent unneeded memoization? - Stack Overflow
Browsing all 2 articles
Browse latest View live

Answer by Will Ness for double stream feed to prevent unneeded memoization?

Normally, definition of primes stream in Richard Bird's formulation of the sieve of Eratosthenes is self-referential:import Data.List.Ordered (minus, union, unionAll)ps = 2 : minus [3..] -- `:` is...

View Article



double stream feed to prevent unneeded memoization?

I'm new to Haskell and I'm trying to implement Euler's Sieve in stream processing style.When I checked the Haskell Wiki page about prime numbers, I found some mysterious optimization technique for...

View Article
Browsing all 2 articles
Browse latest View live




Latest Images