mirror of
https://github.com/rust-lang/rustlings.git
synced 2025-12-28 14:59:18 +00:00
Every good programming exercise book should include the fibonacci
numbers!
One possible solution:
(0..i).fold((0, 1), |(a, b), _| (b, a + b)).1
Signed-off-by: Corin Lawson <corin@responsight.com>