1 2 3 4 5 6 7 8 9 10
pub fn fib(n: i32) -> Vec<i32> { let mut nums: Vec<i32> = vec![]; let (mut a, mut b) = (0, 1); while a < n { nums.push(a); (a, b) = (b, a + b); } nums }