Skip to content

Instantly share code, notes, and snippets.

@tgallant
Created November 4, 2014 05:18
Show Gist options
  • Save tgallant/688f6a26767fbd831418 to your computer and use it in GitHub Desktop.
Save tgallant/688f6a26767fbd831418 to your computer and use it in GitHub Desktop.
euler3
;; e3
(define (e3 n)
(define (e3-inner num div)
(if (> num 1)
(if (= (modulo num div) 0)
(e3-inner (/ num div) (- div 1))
(e3-inner num (+ div 1)))
(+ div 1)))
(e3-inner n 2))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment