From: Jérémie Astor Date: Wed, 19 May 2021 18:14:39 +0000 (+0200) Subject: :wrench: Argument Defaults testing X-Git-Tag: nightly~627 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=96b72f060853c7e423a1433ce347f51421e73267;p=gwion.git :wrench: Argument Defaults testing --- diff --git a/tests/tree/fib-tail.gw b/tests/tree/fib-tail.gw new file mode 100644 index 00000000..4cd3c4a4 --- /dev/null +++ b/tests/tree/fib-tail.gw @@ -0,0 +1,10 @@ +#! [contains] 102334155 +fun int fib(int n, int a : 0, int b : 1) { + if (n == 0) + return a; + if (n == 1) + return b; + return fib(n - 1, b, a + b); +} + +<<< fib(40, 0) >>>;