# HG changeset patch # User Steve Losh # Date 1488492973 0 # Node ID e8225b1bc2b66b9eea0801961e3968b6a67621d0 # Parent ead9bd0ff20ea0f6094c5084b98c0bad86e20c48 Don't be stupid diff -r ead9bd0ff20e -r e8225b1bc2b6 src/euler.lisp --- 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))))))