Skip to content
This repository has been archived by the owner on Aug 31, 2021. It is now read-only.

Commit

Permalink
Rename example files to exemplar
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikSchierboom committed Jan 28, 2021
1 parent eb2246e commit 30e26b4
Show file tree
Hide file tree
Showing 195 changed files with 22 additions and 22 deletions.
44 changes: 22 additions & 22 deletions ...xercises/concept/bird-watcher/example.clj → ...ercises/concept/bird-watcher/exemplar.clj
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
(ns vectors)

(def last-week [0 2 5 3 7 8 4])
(def birds-per-day [2 5 0 7 4 1])

(defn today [birds]
(last birds))

(defn inc-bird [birds]
(update birds (dec (count birds)) inc))

(defn day-without-birds? [birds]
(pos? (count (filter zero? birds))))

(defn n-days-count [birds n]
(reduce + (take n birds)))

(defn busy-days [birds]
(count (filter #(>= % 5) birds)))

(defn odd-week? [birds]
(= birds [1 0 1 0 1 0 1]))
(ns vectors)

(def last-week [0 2 5 3 7 8 4])
(def birds-per-day [2 5 0 7 4 1])

(defn today [birds]
(last birds))

(defn inc-bird [birds]
(update birds (dec (count birds)) inc))

(defn day-without-birds? [birds]
(pos? (count (filter zero? birds))))

(defn n-days-count [birds n]
(reduce + (take n birds)))

(defn busy-days [birds]
(count (filter #(>= % 5) birds)))

(defn odd-week? [birds]
(= birds [1 0 1 0 1 0 1]))

0 comments on commit 30e26b4

Please sign in to comment.