Primes

This model demonstrates the use of function closures inside a CAL actor. The PrimeSieve actor uses nested function closures to realize the Sieve of Eratosthenes, a method for finding prime numbers. Its state variable, "filter," contains the current filter function. If it is "false" a new prime number has been found, and a new filter function will be generated. The PrimeSieve actor expects an ascending sequence of natural numbers, starting from 2, as input.

Primes is available in two formats:

See Web Start Help for details.