diff options
author | Kimplul <kimi.h.kuparinen@gmail.com> | 2025-01-09 22:26:02 +0200 |
---|---|---|
committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2025-01-09 22:26:02 +0200 |
commit | 598be4cd1bdd79e4859ae30291f4d65682cc672a (patch) | |
tree | 6e7e7ad537214c78049c4b3b2ee694c3b549fa4e /examples/fib.fwd | |
parent | 6f7c2d6daa5c706d441ddc42c5c6409e5266049a (diff) | |
download | fwd-598be4cd1bdd79e4859ae30291f4d65682cc672a.tar.gz fwd-598be4cd1bdd79e4859ae30291f4d65682cc672a.zip |
initial reference checking
Diffstat (limited to 'examples/fib.fwd')
-rw-r--r-- | examples/fib.fwd | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/examples/fib.fwd b/examples/fib.fwd index e5014af..9bc5474 100644 --- a/examples/fib.fwd +++ b/examples/fib.fwd @@ -9,8 +9,9 @@ fib(int n, (int) res) if n1 < 2 { res(1); } else { - fib(n2 - 1) => int f1; - fib(n2 - 2) => int f2; + fwd_copy(n2) => int n3, int n4; + fib(n3 - 1) => int f1; + fib(n4 - 2) => int f2; res(f1 + f2); } } |