with
Close resources automatically when the block exits.
Example.kalm
kalm
pub fun firstLine() -> Text?:
with reader = java.util.Scanner("hello\nworld"):
if reader.hasNextLine():
return reader.nextLine()
return null