Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kiranandcode/lean-aoc
Advent of code in Lean4
https://github.com/kiranandcode/lean-aoc
advent-of-code lean lean4
Last synced: about 2 months ago
JSON representation
Advent of code in Lean4
- Host: GitHub
- URL: https://github.com/kiranandcode/lean-aoc
- Owner: kiranandcode
- Created: 2024-11-28T09:57:55.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2024-12-08T11:10:37.000Z (about 2 months ago)
- Last Synced: 2024-12-08T12:19:55.484Z (about 2 months ago)
- Topics: advent-of-code, lean, lean4
- Language: Lean
- Homepage:
- Size: 30.3 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Advent of Code 2024 Lean4
Playing around with Advent of Code in Lean~
Misc programming utils and macros I need will be placed under `Utils/`
This library also provides a wrapper around the AOC API (using curl internally)
```
let input : IO String := AOC.getInput 3
-- retrieves input for day 3 for the current year (call is cached, so repeated evaluations will not make network calls)let input : IO String := AOC.getInput 4 (.some 2023)
-- retrieves input for day 4 for 2023
```Solutions will show up under `Solutions/`
Most solutions will be written using a simple evaluation macro I wrote:
```lean
#example (1 + 1 : Nat)
evaluates to (2: Nat)
```