adventofcode-0.1.0.0: Haskell solutions to adventofcode
LicenseMIT
Maintainer@tylerjl
Safe HaskellSafe-Inferred
LanguageHaskell2010

Y2021.D07

Description

Solutions to the 2021 day 07 set of problems for adventofcode.com.

Synopsis

Documentation

part7A :: Text -> Int #

Solve part A

part7B :: Text -> Int #

Solve part B

crabCost :: Int -> Int #

Function to accept a given Int and return the sum of an origin point to the given Int. Suitable for memoization... I think?

solve7 :: (Ord a, Ord b, Enum b, Num a, Num b) => (b -> a) -> [b] -> a #

Higher-order function to find the lowest fuel cost.

parseCrabs :: Text -> [Int] #

Parse puzzle input into a list of Ints with faster attoparsec.