Skip to content

Blugatroff/adventofcode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

71 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Advent of Code in Haskell

My solutions for AOC 2021 and AOC 2022 !

I'm using this to learn Haskell and purely functional programming in general. Because of that i always try to stick to the immutable solutions before falling back to using the ST or IO Monad.

Progress

  • 2021: 1..22
  • 2022: 1..25

How to Run

nix develop

cabal run aoc -- 2022 17 two

Architecture

The solution to every day is in its own module and exports two functions, one for either part of the problem.

Both functions always have the same signature.

partOne :: String -> Either String String
partTwo :: String -> Either String String

See 2022/Day1.hs for an example of this.

The Main module then just has to pick the right function from the list of days, depending on the CLI arguments, and apply it to the input.

About

Advent of Code in Haskell

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published