view code/test.lm @ 70:5f44ac1bcbd6

Add support for a special notFirst? variable so that globals can be initialized on startup only. This allows for state that persists between turns
author Michael Pavone <pavone@retrodev.com>
date Sun, 27 Jul 2014 23:43:37 -0700
parents 494ef2e3a756
children
line wrap: on
line source

#{
	step <- :myState :world {
		foo <- 1234
		if: (isInteger?: 1 | [(2 + 32 * 8) 3 4]) {
			myState <- 42
		} else: {
			myState <- 24
		}
		#[myState 1]
	}
	
	main <- :initWorld mystery{
		#[0 step]
	}
}