type Banner { title: Text, details: List, count: Int >= 1 } type State { Active, Paused } setting banner: Banner setting names: List setting optional: Text? setting state: State readSize() (out: Int) { out = length(banner.title) + length(names) } copyTitle() (out: Text) { out = banner.title } copyBanner() (out: Banner) { out = banner } copyNames() (out: List) { out = names } nullable() (out: Text?) { out = optional } mode() (out: State) { out = state } measure() (out: Int >= 1) { out = banner.count } select(value: Int) (out: Int) { out = value + readSize() } apply(value: Int, action: handler(value: Int) (out: Int)) (out: Int) { out = action(value) } viaHandler(value: Int) (out: Int) { out = apply(value, select) } flow start() (out: Int) | step | kind | do | | out | calc | readSize() | loop sizes(n: Int) (out: Int) | each value in range(0, n) | result | | out | sum select(value) | plain(value: Int) (out: Int) { out = value } aliasTitle() (out: Text) { first = banner second = first out = second.title } changed() (out: Banner) { out = banner out.title = "new" } present() (out: Text) { value = optional check value != null else Invalid out = value }