diff options
Diffstat (limited to 'examples')
-rw-r--r-- | examples/fib.fwd | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/examples/fib.fwd b/examples/fib.fwd index 9bc5474..7084b9d 100644 --- a/examples/fib.fwd +++ b/examples/fib.fwd @@ -5,13 +5,11 @@ fib(int n, (int) res) { - fwd_copy(n) => int n1, int n2; - if n1 < 2 { + if n < 2 { res(1); } else { - fwd_copy(n2) => int n3, int n4; - fib(n3 - 1) => int f1; - fib(n4 - 2) => int f2; + fib(n - 1) => int f1; + fib(n - 2) => int f2; res(f1 + f2); } } |