new var declaration syntax

This commit is contained in:
2026-05-27 20:25:58 +02:00
parent 284bc61f24
commit 4fda79f0bc
48 changed files with 450 additions and 449 deletions

View File

@@ -1,12 +1,12 @@
func rule110_step[state: Array] : Array
let new_state = []
new_state := []
for i in 0..state->size
let left = false
left := false
if i - 1 >= 0
left = array.nth(state, i - 1)
let center: bool = array.nth(state, i)
let right = false
center : bool = array.nth(state, i)
right := false
if i + 1 < state->size
right = array.nth(state, i + 1)
@@ -23,9 +23,9 @@ func print_state[state: Array]: void
io.println("")
func main[] : i64
let SIZE = 60
SIZE := 60
let state = []
state := []
for i in 0..SIZE
array.push(state, false)
array.push(state, true)