replace the horrible error system with multiple returns
This commit is contained in:
@@ -15,7 +15,11 @@ func part2[l1: Array, l2: Array] : void
|
||||
io.println_i64(out)
|
||||
|
||||
func main[] : i64
|
||||
lines : Array = 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")
|
||||
|
||||
l1 := []
|
||||
l2 := []
|
||||
|
||||
Reference in New Issue
Block a user