aboutsummaryrefslogtreecommitdiff
path: root/examples/loop.lyn
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2024-10-19 21:43:48 +0300
committerKimplul <kimi.h.kuparinen@gmail.com>2024-10-23 18:25:23 +0300
commite3bb9a4ddc0465d4a75ca64e36416a9568c74d27 (patch)
tree2a0281b4885f49ad92a4e5acfe4c28fa88a24129 /examples/loop.lyn
parent7c5f098511b8f612a17f4ccdd8a4924c325d37e1 (diff)
downloadlyn-e3bb9a4ddc0465d4a75ca64e36416a9568c74d27.tar.gz
lyn-e3bb9a4ddc0465d4a75ca64e36416a9568c74d27.zip
some basic programs run
Diffstat (limited to 'examples/loop.lyn')
-rw-r--r--examples/loop.lyn6
1 files changed, 6 insertions, 0 deletions
diff --git a/examples/loop.lyn b/examples/loop.lyn
new file mode 100644
index 0000000..0304672
--- /dev/null
+++ b/examples/loop.lyn
@@ -0,0 +1,6 @@
+let sum 0
+for {let i 0} {< i 1000000} {set i (+ i 1)} {
+ set sum (+ sum i)
+}
+
+println sum