(bind-func print_mersenne_primes
(lambda (upper_bound)
(println "Mersenne primes:")
(let ((p 2))
(while (< p upper_bound)
(if (and (prime_p p)
(mersenne_prime_p p))
(printf " M%lld" p))
(set! p (+ p 1)))
(println))))