record Question { prompt: string, answer: i64 } fn start_main() -> i64 { let questions: list = [ Question { prompt: "2 + 3?", answer: 5 }, Question { prompt: "9 - 4?", answer: 5 }, Question { prompt: "3 * 4?", answer: 12 }, Question { prompt: "12 / 3?", answer: 4 }, Question { prompt: "7 + 8?", answer: 15 } ]; print(questions[0]::prompt + " "); let line: string = read_line(); if (line matches "q") { print("Stopped early. Correct: 0; answered: 0; total: " + format_i64(length(questions)) + ".\n"); return 0; } let parsed: result = parse_i64(line); if (parsed::ok) { print("Parsed: " + format_i64(parsed::value) + "\n"); } else { print("Invalid: " + parsed::error::code + "\n"); } return 0; }