c6dd13c10ce4

Cleanup
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Mon, 27 Feb 2017 17:21:42 +0000
parents 42b1fe4f8f27
children 0fc16405aff4
branches/tags (none)
files src/euler.lisp

Changes

diff -r 42b1fe4f8f27 -r c6dd13c10ce4 src/euler.lisp
--- a/src/euler.lisp	Mon Feb 27 17:13:34 2017 +0000
+++ b/src/euler.lisp	Mon Feb 27 17:21:42 2017 +0000
@@ -1487,12 +1487,11 @@
   (let ((primes (sieve 1000000)))
     (flet ((score (start)
              (iterate
-               (with sum = 0)
                (with score = 0)
                (with winner = 0)
                (for run :from 1)
                (for prime :in-vector primes :from start)
-               (incf sum prime)
+               (summing prime :into sum)
                (while (< sum 1000000))
                (when (primep sum)
                  (setf score run