annotate samples/testarray.tp @ 47:cd41f7c22fcd

Remove compiled hello and private samples and add source
author Mike Pavone <pavone@retrodev.com>
date Fri, 13 Jul 2012 08:50:10 -0700
parents 927fd7911a01
children 48daa1d3e052
rev   line source
pavone@39 1 #{
pavone@40 2 sum <- :arr {
pavone@40 3 cursum <- 0
pavone@40 4 foreach: arr :idx el {
pavone@40 5 cursum <- cursum + el
pavone@40 6 }
pavone@40 7 cursum
pavone@40 8 }
pavone@39 9 main <- {
pavone@39 10 foo <- #[42 30 28]
pavone@40 11 bar <- #[]
pavone@40 12 bar append: 30
pavone@40 13 bar append: 28
pavone@40 14 bar append: 42
pavone@40 15 (sum: foo) + (sum: bar)
pavone@39 16 }
pavone@39 17 }
pavone@39 18