Skip to content

Commit

Permalink
Merge pull request #1 from dfuenzalida/dfuenzalida-p045
Browse files Browse the repository at this point in the history
Formatting change on p045 to check Azure pipelines
  • Loading branch information
dfuenzalida authored Aug 26, 2019
2 parents 7389b41 + b78c2cb commit 0eece0e
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/euler/p045/dfuenzalida.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,14 @@
[euler.p045.data :refer [answer]]
[clojure.test :as t :refer [is testing]]))

(defn triangles [] (map (fn [n] (/ (* n (inc n)) 2)) (rest (range))))
(defn pentagonals [] (map (fn [n] (/ (* n (dec (* 3 n))) 2)) (rest (range))))
(defn hexagonals [] (map (fn [n] (* n (dec (* 2 n)))) (rest (range))))
(defn triangles []
(map (fn [n] (/ (* n (inc n)) 2)) (rest (range))))

(defn pentagonals []
(map (fn [n] (/ (* n (dec (* 3 n))) 2)) (rest (range))))

(defn hexagonals []
(map (fn [n] (* n (dec (* 2 n)))) (rest (range))))

(defn matches [ts ps hs]
(let [t (first ts)
Expand Down

0 comments on commit 0eece0e

Please sign in to comment.