aboutsummaryrefslogtreecommitdiffstats
path: root/day1/part1.clj
diff options
context:
space:
mode:
authorClyne Sullivan <clyne@bitgloo.com>2022-11-30 19:55:31 -0500
committerClyne Sullivan <clyne@bitgloo.com>2022-11-30 19:55:31 -0500
commit8d43e37df99f280377bed90284d6ac2428334804 (patch)
tree3a5042c9af29da52b4bac38fd78b3ccde77a1dbc /day1/part1.clj
parent66ed0b9d27850dc653abc8baa75884f3de311bfa (diff)
move 2021 days to folder; update README
Diffstat (limited to 'day1/part1.clj')
-rw-r--r--day1/part1.clj15
1 files changed, 0 insertions, 15 deletions
diff --git a/day1/part1.clj b/day1/part1.clj
deleted file mode 100644
index 1c2c756..0000000
--- a/day1/part1.clj
+++ /dev/null
@@ -1,15 +0,0 @@
-; Day 1, part 1
-; Read a list of numbers from stdin, separated by newlines.
-; Count occurances of the current number being greater than
-; the previous.
-;
-
-(as-> (slurp "./in") $
- (clojure.string/split-lines $)
- (map read-string $)
- (reduce
- #(cond-> (assoc %1 0 %2) (> %2 (first %1)) (update 1 inc))
- [(first $) 0]
- (rest $))
- (println (second $)))
-