aboutsummaryrefslogtreecommitdiff
path: root/examples/sum.fwd
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2026-05-01 22:43:13 +0300
committerKimplul <kimi.h.kuparinen@gmail.com>2026-05-01 22:43:13 +0300
commitdb3809488805fbdcd9d726d9ed45ad7335812bd1 (patch)
treedcf1ceb68a7d77733a474825a9804fe99d253b48 /examples/sum.fwd
parentf1e9860ab638594e95db0ada848157b860eeb831 (diff)
downloadfwd-db3809488805fbdcd9d726d9ed45ad7335812bd1.tar.gz
fwd-db3809488805fbdcd9d726d9ed45ad7335812bd1.zip
remove examples in favour of testsHEADmaster
+ Might come up with proper examples at some point, but for now tests at least tell us if they're broken
Diffstat (limited to 'examples/sum.fwd')
-rw-r--r--examples/sum.fwd23
1 files changed, 0 insertions, 23 deletions
diff --git a/examples/sum.fwd b/examples/sum.fwd
deleted file mode 100644
index 89a2d11..0000000
--- a/examples/sum.fwd
+++ /dev/null
@@ -1,23 +0,0 @@
-print_int(i64 a);
-print_nl();
-
-sum_inner(i64 s, i64 n, (i64) res)
-{
- if n <= 0 {
- res(s);
- } else {
- sum_inner(s + n, n - 1, res);
- }
-}
-
-sum(i64 n, (i64) res)
-{
- sum_inner(0, n, res);
-}
-
-main()
-{
- sum(1000000000) => i64 s;
- print_int(s);
- print_nl();
-}