Integer Prototypes
Integer values expose mutation helpers.
let count = 1
count.increment()
println(count)Literal calls
Section titled “Literal calls”Store a literal in a variable before calling its methods. Direct prototype calls on literals are limited by the current parser.
Methods
Section titled “Methods”| Method | Returns | Description |
|---|---|---|
increment() | void | Increments the integer by 1. |
decrement() | void | Decrements the integer by 1. |
Example
Section titled “Example”let count = 0
count.increment()count.increment()count.decrement()
println(count)