replace the horrible error system with multiple returns
This commit is contained in:
@@ -40,7 +40,11 @@ func part2[data: 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")
|
||||
|
||||
data := []
|
||||
for i in 0..lines->size
|
||||
|
||||
Reference in New Issue
Block a user