Mercurial > repos > tabletprog
view samples/slist.tp @ 219:b70be565d54c
Fix check of return value from env.find in symbol.quote so that falsey found values do not cause trouble.
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Mon, 23 Dec 2013 14:22:20 -0800 |
parents | 18598163e3ef |
children |
line wrap: on
line source
#{ sum <- :l { l fold: 0 with: :acc el { acc + el } } main <- { print: (string: (sum: [])) . "\n" print: (string: (sum: [1 2 3 4])) . "\n" print: (string: (sum: 1 | 2 | 3 | 4 | [])) . "\n" print: (string: (sum: [1 2] . [3 4])) . "\n" } }