Mercurial > repos > tabletprog
comparison samples/recursive_closure.tp @ 68:3a169ebb3224
Change strategy for handling true and false to avoid some initialization order problems and improve performance. Add support for negative integer literals. Update samples to reflect true/false change.
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Sat, 14 Jul 2012 16:14:01 -0700 |
parents | 93ddb4ad6fcb |
children |
comparison
equal
deleted
inserted
replaced
67:42d5660b30b4 | 68:3a169ebb3224 |
---|---|
1 #{ | 1 #{ |
2 true <- #{ | |
3 if:else <- :self trueblock :elseblock { | |
4 trueblock: | |
5 } | |
6 } | |
7 | |
8 false <- #{ | |
9 if:else <- :self trueblock :elseblock { | |
10 elseblock: | |
11 } | |
12 } | |
13 main <- { | 2 main <- { |
14 foo <- :n { | 3 foo <- :n { |
15 if: n < 10 { | 4 if: n < 10 { |
16 true | 5 true |
17 } else: { | 6 } else: { |