From 872818fe7c2a14fc3090d95549783b5383b4e3be Mon Sep 17 00:00:00 2001 From: John Date: Fri, 26 Jul 2024 06:13:59 -0500 Subject: [PATCH] sample-code/fib.cl: rename fib-iterative -> fibit (easier to type) --- sample-code/fib.cl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sample-code/fib.cl b/sample-code/fib.cl index 3276186..6fba537 100644 --- a/sample-code/fib.cl +++ b/sample-code/fib.cl @@ -2,7 +2,7 @@ fn main() { for num in 0..=30 { - println("fib(", num, ") = ", fib_iterative(num)) + println("fib(", num, ") = ", fibit(num)) } for num in 0..=30 { println("fib(", num, ") = ", fib(num)) @@ -17,7 +17,7 @@ fn fib(a: i64) -> i64 { } /// The classic iterative algorithm for fib() -fn fib_iterative(n: i64) -> i64 { +fn fibit(n: i64) -> i64 { let mut a = 0; let mut b = 1; let mut c = 1;