aboutsummaryrefslogtreecommitdiff
path: root/examples/fib.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/fib.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/fib.fwd')
-rw-r--r--examples/fib.fwd30
1 files changed, 0 insertions, 30 deletions
diff --git a/examples/fib.fwd b/examples/fib.fwd
deleted file mode 100644
index 4583a26..0000000
--- a/examples/fib.fwd
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Currently the compilation process requires a bit of manual intervention.
- * For this particular example, run something like this from the root dir:
- *
- * ./fwd examples/fib.fwd > /tmp/fib.c
- * gcc -Lmod -Iinclude -Ilib -Wl,-rpath=mod -O2 /tmp/fib.c -lfwdio -o /tmp/fib
- * /tmp/fib
- *
- */
-
-/* modules are just libraries that can be loaded at runtime */
-import "../mod/libfwdio.so"
-
-fib(i64 n, (i64) res)
-{
- if n < 2 {
- res(1);
- } else {
- fib(n - 1) => i64 f1;
- fib(n - 2) => i64 f2;
- res(f1 + f2);
- }
-}
-
-main()
-{
- fib(42) => i64 n;
- fwdprint_i64(n);
- fwdprint_nl();
-}