add coprime? to math.primes

db4
Doug Coleman 2008-02-27 23:09:29 -06:00
parent 13290fcd82
commit 260acff952
1 changed files with 2 additions and 0 deletions

View File

@ -47,3 +47,5 @@ PRIVATE>
primes-upto
>r 1- next-prime r>
[ [ <=> ] binsearch ] keep [ length ] keep <slice> ; foldable
: coprime? ( a b -- ? ) gcd nip 1 = ; foldable