RosettaCodeData/Task/Ultra-useful-primes/Factor/ultra-useful-primes.factor
2023-07-01 13:44:08 -04:00

7 lines
203 B
Factor

USING: io kernel lists lists.lazy math math.primes prettyprint ;
: useful ( -- list )
1 lfrom
[ 2^ 2^ 1 lfrom [ - prime? ] with lfilter car ] lmap-lazy ;
10 useful ltake [ pprint bl ] leach nl