annotate samples/recursive_closure.tp @ 55:93ddb4ad6fcb

Fix some nested closure bugs
author Mike Pavone <pavone@retrodev.com>
date Fri, 13 Jul 2012 21:05:52 -0700
parents
children 3a169ebb3224
rev   line source
pavone@55 1 #{
pavone@55 2 true <- #{
pavone@55 3 if:else <- :self trueblock :elseblock {
pavone@55 4 trueblock:
pavone@55 5 }
pavone@55 6 }
pavone@55 7
pavone@55 8 false <- #{
pavone@55 9 if:else <- :self trueblock :elseblock {
pavone@55 10 elseblock:
pavone@55 11 }
pavone@55 12 }
pavone@55 13 main <- {
pavone@55 14 foo <- :n {
pavone@55 15 if: n < 10 {
pavone@55 16 true
pavone@55 17 } else: {
pavone@55 18 foo <- :n { n }
pavone@55 19 }
pavone@55 20 foo: n + 1
pavone@55 21 }
pavone@55 22 print: (string: (foo: 0))
pavone@55 23 }
pavone@55 24 }