Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mhanberg/advent-of-code-clojure-starter
Template project for Advent of Code in Clojure.
https://github.com/mhanberg/advent-of-code-clojure-starter
Last synced: 3 months ago
JSON representation
Template project for Advent of Code in Clojure.
- Host: GitHub
- URL: https://github.com/mhanberg/advent-of-code-clojure-starter
- Owner: mhanberg
- Created: 2019-11-29T04:16:18.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2019-12-01T16:36:00.000Z (about 5 years ago)
- Last Synced: 2024-08-03T18:13:22.567Z (5 months ago)
- Language: Clojure
- Homepage:
- Size: 6.84 KB
- Stars: 8
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
- awesome-advent-of-code - mhanberg/advent-of-code-clojure-starter
README
# Advent of Code Clojure Starter
A batteries included starter pack for participating in [Advent of Code](https://www.adventofcode.com) using Clojure!
(This projects uses [lein](https://github.com/technomancy/leiningen)).
## Usage
There are 25 namespaces, 25 input files 25 example input files, 25 tests, and 50 `lein` tasks.
1. Fill in the tests with the example solutions.
1. Write your implementation.
1. Fill in the final problem inputs into the `lein` task and run `lein run d01.p1`!```clojure
(ns advent-of-code.day-01)(defn part-1
"Day 01 Part 1"
[input]
input)(defn part-2
"Day 01 Part 2"
[input]
input)
``````clojure
(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")))))))
```## Installation
```bash
# 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
```