sln_2021_01
Copyright(c) Eric Mertens 2021
LicenseISC
Maintaineremertens@gmail.com
Safe HaskellNone
LanguageHaskell2010

Main

Description

https://adventofcode.com/2021/day/1

Count the number of increasing pairs of measurements.

Synopsis

Documentation

main :: IO () Source #

>>> :main
1681
1704

solve Source #

Arguments

:: Int

window size

-> [Int]

measurements

-> Int

count of ascending pairs

>>> solve 1 [199, 200, 208, 210, 200, 207, 240, 269, 260, 263]
7
>>> solve 3 [199, 200, 208, 210, 200, 207, 240, 269, 260, 263]
5