Login
7 branches 0 tags
Ben (X13/Arch) Moved to using images for bootstrapping the runtime 4edeb8f 2 years ago 1174 Commits
nujel / benchmark / euler1 / racket.rkt
#lang racket/base

(define (multiple-of-3-or-5? α)
  (or (zero? (modulo α 3))
      (zero? (modulo α 5))))

(define (test-run)
  (do ([i 0 (+ 1 i)]
       [ret 0])
      ((>= i 10000000) ret)
    (when (multiple-of-3-or-5? i)
      (set! ret (+ ret i)))))

(display "The sum is:")
(display (test-run))
(newline)