P31
(de is-prime (N) (or (= N 2) (and (> N 1) (bit? 1 N) (for (D 3 T (+ D 2)) (T (> D (sqrt N)) T) (T (=0 (% N D)) NIL) ) ) ) )
http://picolisp.com/wiki/?99p31
10jul10 | abu |
(de is-prime (N) (or (= N 2) (and (> N 1) (bit? 1 N) (for (D 3 T (+ D 2)) (T (> D (sqrt N)) T) (T (=0 (% N D)) NIL) ) ) ) )
http://picolisp.com/wiki/?99p31
10jul10 | abu |