Skip to content

Instantly share code, notes, and snippets.

@Isaac-Kleinman
Created September 17, 2015 21:04
Show Gist options
  • Save Isaac-Kleinman/1b623bc2463b241b4383 to your computer and use it in GitHub Desktop.
Save Isaac-Kleinman/1b623bc2463b241b4383 to your computer and use it in GitHub Desktop.
SICP Exercise 1.22
(define (timed-prime-test n)
(newline)
(display n)
(let-values ([(result-list t real gc)
(time-apply prime? (list n))])
(cond ((car result-list)
(display " *** ")
(display real)))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment