replace the horrible error system with multiple returns
This commit is contained in:
@@ -61,7 +61,11 @@ func part2[equations: Array] : void
|
||||
io.println_i64(out)
|
||||
|
||||
func main[] : i64
|
||||
lines := must(io.read_text_file?("input.txt")) |> str.split("\n")
|
||||
~input, ok := io.read_text_file("input.txt")
|
||||
if !ok
|
||||
panic("failed to open input.txt")
|
||||
|
||||
lines := str.split(input, "\n")
|
||||
equations := []
|
||||
|
||||
for i in 0..lines->size
|
||||
|
||||
Reference in New Issue
Block a user