diff options
| -rw-r--r-- | challenge-077/tyler-wardhaugh/clojure/src/tw/weekly/ch_1.clj | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/challenge-077/tyler-wardhaugh/clojure/src/tw/weekly/ch_1.clj b/challenge-077/tyler-wardhaugh/clojure/src/tw/weekly/ch_1.clj index 4ab609b3d8..4d5d0e1375 100644 --- a/challenge-077/tyler-wardhaugh/clojure/src/tw/weekly/ch_1.clj +++ b/challenge-077/tyler-wardhaugh/clojure/src/tw/weekly/ch_1.clj @@ -20,7 +20,7 @@ (defn fibo-sum "Find all combinations of Fibonacci Numbers that sum to n, returning nil if none are found." [n] - (let [fibs (drop 2 (take n (fibo-lazy-seq))) + (let [fibs (drop 2 (take-while #(< % n) (fibo-lazy-seq))) results (->> fibs combo/subsets (drop 1) ; remove the empty subset, which is always first |
