@@ 1,22 1,22 @@
(ns bird-watcher)
(def last-week
- )
+ [0 2 5 3 7 8 4])
(defn today [birds]
- )
+ (last birds))
(defn inc-bird [birds]
- )
+ (assoc birds (dec (count birds)) (inc (today birds))))
(defn day-without-birds? [birds]
- )
+ (boolean (some zero? birds)))
(defn n-days-count [birds n]
- )
+ (apply + (take n birds)))
(defn busy-days [birds]
- )
+ (count (filter #(>= % 5) birds)))
(defn odd-week? [birds]
- )
+ (= birds [1 0 1 0 1 0 1]))
@@ 0,0 1,1 @@
[{:dependencies {cider/cider-nrepl {:vsn "0.28.6", :native-prefix nil}, nrepl {:vsn "1.0.0", :native-prefix nil}, org.clojure/clojure {:vsn "1.10.0", :native-prefix nil}, org.clojure/spec.alpha {:vsn "0.2.176", :native-prefix nil}, org.clojure/core.specs.alpha {:vsn "0.2.44", :native-prefix nil}, org.nrepl/incomplete {:vsn "0.1.0", :native-prefix nil}}, :native-path "target/native"} {:native-path "target/native", :dependencies {cider/cider-nrepl {:vsn "0.28.6", :native-prefix nil, :native? false}, nrepl {:vsn "1.0.0", :native-prefix nil, :native? false}, org.clojure/clojure {:vsn "1.10.0", :native-prefix nil, :native? false}, org.clojure/spec.alpha {:vsn "0.2.176", :native-prefix nil, :native? false}, org.clojure/core.specs.alpha {:vsn "0.2.44", :native-prefix nil, :native? false}, org.nrepl/incomplete {:vsn "0.1.0", :native-prefix nil, :native? false}}}]
\ No newline at end of file