/usr/share/picolisp/misc/sieve.l is in picolisp 15.11-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | # 25feb10abu
# (c) Software Lab. Alexander Burger
# Sieve of Eratosthenes
(de sieve (N)
(let Sieve (range 1 N)
(set Sieve)
(for I (cdr Sieve)
(when I
(for (S (nth Sieve (* I I)) S (nth (cdr S) I))
(set S) ) ) )
(filter bool Sieve) ) )
# vi:et:ts=3:sw=3
|