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

Y2021.D01

Description

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

Synopsis

Documentation

part1A :: Text -> Int #

First attempt at part a, not optimized.

part1AZip :: Text -> Int #

Part a using high-level zip operations.

part1ARecur :: Text -> Int #

Part a using simple recursion (maybe smaller big-O?)

part1B :: Text -> Int #

Part b first attempt, simple approach

part1BZip :: Text -> Int #

Part b using highl-elevel zips

compareAdj :: [Int] -> [(Int, Int)] #

Utility to transform a list into tuples of adjacent values.

trisum :: Num a => (a, a, a) -> a #

Sum all values of a three-tuple

stepwise :: [Int] -> Int #

A fold sum of the structure for parsed values.

toWindows :: [Int] -> [Int] #

Consolidate a list into a summed, shifting window.

asInts :: Text -> [Int] #

Unsafe-ish Text traversal to transform into a list of Ints.