Create a list of primes “as you go”, considering a number prime if it can’t be divided by any number already considered prime.
However, although my straightforward solution worked on discrete ranges, it couldn’t yield a single prime when called on an infinite range – something I’m completely unused to from other languages, except for some experience with the SERIES library in Common Lisp.


Recent Comments