Advent of Code solutions

fix

+3 -3
+3 -3
2023/1/p1.tri
··· 1 1 import "trilogy:io" use readlines, println 2 2 import "trilogy:string" use chars 3 - import "trilogy:array" use filter, map, reduce, collect 3 + import "trilogy:array" use filter, map, fold, collect 4 4 import "trilogy:parsec" use parse, integer 5 5 6 6 func is_digit '0' or '1' or '2' or '3' or '4' or '5' or '6' or '7' or '8' or '9' = true ··· 17 17 >> combine 18 18 >> parse integer 19 19 ) 20 - |> reduce (+) 21 - println!(total) 20 + |> fold (+) 0 21 + println!("${total}") 22 22 }