e8225b1bc2b6

Don't be stupid
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Thu, 02 Mar 2017 22:16:13 +0000
parents ead9bd0ff20e
children 964ca82e487d
branches/tags (none)
files src/euler.lisp

Changes

--- a/src/euler.lisp	Thu Mar 02 22:12:19 2017 +0000
+++ b/src/euler.lisp	Thu Mar 02 22:16:13 2017 +0000
@@ -1799,20 +1799,19 @@
                     (for k :in-looping key)
                     (collect (logxor number k))))
          (score-keyword (keyword)
-           (-<> (apply-cipher (coerce keyword 'list))
+           (-<> (apply-cipher keyword)
              (stringify <>)
              (string-downcase <>)
              (cl-strings:split <>)
              (remove-if-not (curry #'hset-contains-p words) <>)
              length))
          (answer (keyword)
-           (sum (apply-cipher (coerce keyword 'list)))))
-      (answer
-        (iterate (for-nested ((a :from (char-code #\a) :to (char-code #\z))
-                              (b :from (char-code #\a) :to (char-code #\z))
-                              (c :from (char-code #\a) :to (char-code #\z))))
-                 (for keyword = (list a b c))
-                 (finding keyword :maximizing (score-keyword keyword)))))))
+           (sum (apply-cipher keyword))))
+      (iterate (for-nested ((a :from (char-code #\a) :to (char-code #\z))
+                            (b :from (char-code #\a) :to (char-code #\z))
+                            (c :from (char-code #\a) :to (char-code #\z))))
+               (for keyword = (list a b c))
+               (finding (answer keyword) :maximizing (score-keyword keyword))))))