Mercurial > repos > tabletprog
comparison samples/oper_impl.tp @ 126:a2d2d8e09291
Merge
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Mon, 05 Aug 2013 23:37:17 -0700 |
parents | 9820ecd4eed4 |
children |
comparison
equal
deleted
inserted
replaced
125:6f8d868e8da0 | 126:a2d2d8e09291 |
---|---|
1 #{ | |
2 pair <- :a b { | |
3 #{ | |
4 first <- a | |
5 second <- b | |
6 + <- :other { | |
7 pair: first + (other first) second + (other second) | |
8 } | |
9 } | |
10 } | |
11 | |
12 main <- { | |
13 foo <- pair: 5 7 | |
14 bar <- pair: 9 23 | |
15 baz <- foo + bar | |
16 print: ((baz first) string) . "\n" | |
17 print: ((baz second) string) . "\n" | |
18 0 | |
19 } | |
20 } |