| 1 | (define (benchmark seed) |
| 2 | (let loop ((n (+ 1000 seed)) (acc 0)) |
| 3 | (if (= n 0) acc |
| 4 | (loop (- n 1) (+ acc (call-with-values (lambda () (values n (+ n 1))) (lambda (a b) (+ a b)))))))) |
| 5 | (define (run-batch count) |
| 6 | (let loop ((left count) (seed 0)) |
| 7 | (if (= left 0) 1002000 |
| 8 | (if (= (benchmark seed) (if (= seed 0) 1002000 (if (= seed 1) 1004003 (if (= seed 2) 1006008 1008015)))) |
| 9 | (loop (- left 1) (if (= seed 3) 0 (+ seed 1))) #f)))) |
| 10 |