Mercurial > repos > icfp2014
comparison code/test.lm @ 7:afd55b32549b
Implement support for local variables and top level functions
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Fri, 25 Jul 2014 13:47:21 -0700 |
parents | a9a2ad99adfb |
children | 494ef2e3a756 |
comparison
equal
deleted
inserted
replaced
6:0ab6eb5f0190 | 7:afd55b32549b |
---|---|
1 #{ | 1 #{ |
2 init <- { | 2 step <- :myState :world { |
3 #[1 2 3 4] | 3 foo <- 1234 |
4 if: (isInteger?: 1 | [(2 + 32 * 8) 3 4]) { | |
5 myState <- 42 | |
6 } else: { | |
7 myState <- 24 | |
8 } | |
9 #[myState 1] | |
4 } | 10 } |
5 | 11 |
6 main <- { | 12 main <- { |
7 if: (isInteger?: 1 | [(2 + 32 * 8) 3 4]) { | 13 #[0 step] |
8 42 | |
9 } else: { | |
10 24 | |
11 } | |
12 } | 14 } |
13 } | 15 } |