aboutsummaryrefslogtreecommitdiffhomepage
path: root/samples/aoc/2022/01/solve.bruijn
blob: e213e8580902420fe347c3f78b387ce88b64c923 (plain) (blame)
1
2
3
4
5
6
7
:import std/Combinator .
:import std/Math .
:import std/String .

main blocks → (map (map string→number)) → (map sum) → sort-desc → res
	res [^0 : (^0 + ^(~0) + ^(~(~0)))]
	blocks [split-list-by (eq? "\n") (lines 0)]