(bind-func divisors
"find the prime factors of n"
(lambda (n)
(letz ((factors (list))
(d 2))
(if (< n 2)
(begin (set! factors (cons n factors))
void)
(while (< d n)
(if (= (% n d) 0)
(begin (set! factors (cons d factors))
(set! n (/ n d)))
(if (= d 2)
(set! d 3)
(set! d (+ d 2))))))
factors)))