mirror of
https://github.com/rust-lang/rustlings.git
synced 2024-12-28 08:16:29 +00:00
e0274e07d0
Tackles https://github.com/carols10cents/rustlings/issues/15 . I think this allows for varying levels of difficulty depending on a users background. But ideally people can move there way up from 1, 2, 3 (Numbers below). 1. let mut result = 1; for i in 1..x + 1 { result *= i; } result 2. match x { 0 | 1 => 1, x => x * factorial(x - 1), } 3. (1..x + 1).product() |
||
---|---|---|
.. | ||
arc1.rs | ||
iterator3.rs | ||
iterators4.rs |