annotate samples/slist.tp @ 245:3590ecca6bc9

Fix handling of unescaped tabs in string literals in new parser
author Mike Pavone <pavone@retrodev.com>
date Mon, 06 Jan 2014 01:03:18 -0800
parents 18598163e3ef
children
rev   line source
pavone@170 1 #{
pavone@170 2 sum <- :l {
pavone@170 3 l fold: 0 with: :acc el {
pavone@170 4 acc + el
pavone@170 5 }
pavone@170 6 }
pavone@170 7 main <- {
pavone@170 8 print: (string: (sum: [])) . "\n"
pavone@170 9 print: (string: (sum: [1 2 3 4])) . "\n"
pavone@170 10 print: (string: (sum: 1 | 2 | 3 | 4 | [])) . "\n"
pavone@170 11 print: (string: (sum: [1 2] . [3 4])) . "\n"
pavone@170 12 }
pavone@170 13 }