Skip to content

Integer Prototypes

Integer values expose mutation helpers.

let count = 1
count.increment()
println(count)

Store a literal in a variable before calling its methods. Direct prototype calls on literals are limited by the current parser.

MethodReturnsDescription
increment()voidIncrements the integer by 1.
decrement()voidDecrements the integer by 1.
let count = 0
count.increment()
count.increment()
count.decrement()
println(count)