A batteries included starter pack for participating in Advent of Code using Clojure!
(This projects uses lein).
There are 25 namespaces, 25 input files 25 example input files, 25 tests, and 50 lein
tasks.
- Fill in the tests with the example solutions.
- Write your implementation.
- Fill in the final problem inputs into the
lein
task and runlein run d01.p1
!
(ns advent-of-code.day-01)
(defn part-1
"Day 01 Part 1"
[input]
input)
(defn part-2
"Day 01 Part 2"
[input]
input)
(ns advent-of-code.core-test
(:require [clojure.test :refer [deftest testing is]]
[advent-of-code.day-01 :refer [part-1 part-2]]
[clojure.java.io :refer [resource]]))
(deftest part1
(let [expected nil]
(is (= expected (part-1 (slurp (resource "day-1-example.txt")))))))
(deftest part2
(let [expected nil]
(is (= expected (part-2 (slurp (resource "day-1-example.txt")))))))
# clone
$ git clone [email protected]:mhanberg/advent-of-code-clojure-starter.git advent-of-code
$ cd advent-of-code
# Reinitialize your git repo
$ rm -rf .git
$ git init