]> gitweb.factorcode.org Git - factor.git/blob - extra/math/primes/lists/lists.factor
Delete empty unit tests files, remove 1- and 1+, reorder IN: lines in a lot of places...
[factor.git] / extra / math / primes / lists / lists.factor
1 ! Copyright (C) 2007-2009 Samuel Tardieu.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: kernel lists.lazy math math.primes ;
4 IN: math.primes.lists
5
6 : lprimes ( -- list ) 2 [ next-prime ] lfrom-by ;
7
8 : lprimes-from ( n -- list )
9     dup 3 < [ drop lprimes ] [ 1 - next-prime [ next-prime ] lfrom-by ] if ;