diff options
Diffstat (limited to 'examples/sum.lyn')
-rw-r--r-- | examples/sum.lyn | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/examples/sum.lyn b/examples/sum.lyn deleted file mode 100644 index 55338f6..0000000 --- a/examples/sum.lyn +++ /dev/null @@ -1,18 +0,0 @@ -syntax for {init cond post body} { - eval init - while {eval cond} { - eval body - eval post - } -} - -def sum {n} { - require n int - let s 0 - for {let i 0} {< i n} {set i (+ i 1)} { - set s (+ s i) - } - return s -} - -println (sum 1000000) |