mirror of
https://github.com/RGBCube/AdventOfCode
synced 2025-07-27 12:07:45 +00:00
Add day 1 part 2
This commit is contained in:
parent
3a223b8219
commit
dfda2c002c
4 changed files with 1047 additions and 4 deletions
|
@ -1,6 +1,6 @@
|
|||
{ lib, input }:
|
||||
|
||||
with lib; with builtins; let
|
||||
with builtins; with lib; rec {
|
||||
lines = splitString "\n" input;
|
||||
|
||||
linesChars = map (splitString "") lines;
|
||||
|
@ -14,4 +14,4 @@ with lib; with builtins; let
|
|||
sumOfLinesNumbers = foldl' add 0 (map fromJSON linesNumbers);
|
||||
|
||||
result = sumOfLinesNumbers;
|
||||
in result
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue