Login
7 branches 0 tags
Ben (MBA M2) Fixed bug in :last-index-of and added tests f5a037c 2 years ago 1145 Commits
nujel / benchmark / euler1 / main.zuo
#lang zuo

(define [multiple-of-3-or-5? a]
  [or [= 0 [modulo a 3]]
      [= 0 [modulo a 5]]])

(define (test-run i ret)
  (cond ((>= i 10000000) ret)
        (else (test-run (+ 1 i) (if (multiple-of-3-or-5? i) (+ ret i) ret)))))

(alert "The sum is" (test-run 0 0))