From 17c7dbd9cec96862384c4323a0e36eb0558b580d Mon Sep 17 00:00:00 2001 From: Kimplul Date: Mon, 17 Mar 2025 21:49:25 +0200 Subject: fix some total moves --- examples/fib.fwd | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'examples') 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); } } -- cgit v1.2.3