aboutsummaryrefslogtreecommitdiff
path: root/examples/sum.lyn
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2024-10-20 22:47:03 +0300
committerKimplul <kimi.h.kuparinen@gmail.com>2024-10-23 18:25:23 +0300
commit4cf7c8bacfc836cff5278317cb32dc029cb87273 (patch)
tree58d30dca3fe413c146fd0020abf8796606030db5 /examples/sum.lyn
parentc5babf57de94a9a5e35c4bbb1237f3bffd15456c (diff)
downloadlyn-4cf7c8bacfc836cff5278317cb32dc029cb87273.tar.gz
lyn-4cf7c8bacfc836cff5278317cb32dc029cb87273.zip
play around with guile as a backend
+ I have officially devolved my language into an alternative syntax for Scheme. Oh well.
Diffstat (limited to 'examples/sum.lyn')
-rw-r--r--examples/sum.lyn18
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)