From db3809488805fbdcd9d726d9ed45ad7335812bd1 Mon Sep 17 00:00:00 2001 From: Kimplul Date: Fri, 1 May 2026 22:43:13 +0300 Subject: remove examples in favour of tests + Might come up with proper examples at some point, but for now tests at least tell us if they're broken --- examples/fib.fwd | 30 ------------------------------ 1 file changed, 30 deletions(-) delete mode 100644 examples/fib.fwd (limited to 'examples/fib.fwd') 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(); -} -- cgit v1.2.3