// Standard I/O utilities // Wraps Console effect with convenient functions /// Print a line with a newline pub fn println(s: String): Unit with {Console} = Console.print(s) /// Print without newline (if supported) pub fn print(s: String): Unit with {Console} = Console.print(s) /// Read a line from input pub fn readLine(): String with {Console} = Console.readLine() /// Read an integer from input pub fn readInt(): Int with {Console} = Console.readInt() /// Print a debug representation of any value pub fn debug(label: String, value: T): T with {Console} = { Console.print(label + ": " + toString(value)) value } /// Print multiple strings on separate lines pub fn printAll(lines: List): Unit with {Console} = List.fold(lines, (), fn(acc: Unit, line: String): Unit with {Console} => Console.print(line))