remove the pipe operator

This commit is contained in:
2026-06-06 19:41:54 +02:00
parent c41c22e936
commit 3a53cd4f32
9 changed files with 19 additions and 79 deletions

View File

@@ -12,9 +12,9 @@ func part1[ranges: Array] : void
sum := 0
for i in 0..ranges->size
parts := array.nth(ranges, i) |> str.split("-")
start := array.nth(parts, 0) |> str.parse_i64()
end := array.nth(parts, 1) |> str.parse_i64()
parts := str.split(array.nth(ranges, i), "-")
start := str.parse_i64(array.nth(parts, 0))
end := str.parse_i64(array.nth(parts, 1))
for n in (start)..end+1
if part1_is_invalid_id(str.from_i64(n))
@@ -43,9 +43,9 @@ func part2[ranges: Array] : void
sum := 0
for i in 0..ranges->size
parts := array.nth(ranges, i) |> str.split("-")
start := array.nth(parts, 0) |> str.parse_i64()
end := array.nth(parts, 1) |> str.parse_i64()
parts := str.split(array.nth(ranges, i), "-")
start := str.parse_i64(array.nth(parts, 0))
end := str.parse_i64(array.nth(parts, 1))
for n in (start)..end+1
if part2_is_invalid_id(str.from_i64(n))