Commit Graph

10 Commits (291182d3084f9eb583c101c61c40ac6725741930)

Author SHA1 Message Date
Robert Lugg 7d7a48b17d Added filename to top of .rs files 7 years ago
Matthew Williamson e0274e07d0 Create iterators4.rs
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()
8 years ago
Carol (Nichols || Goulding) 4bf727cbf7 Incorporate ConnyOnny's iterator exercise!
- Deciding not to have solutions in the tree right now, until I figure
  out a more general way to handle that.
- The assertions work really great as tests, actually!
- Simplifying a few of the side points-- I think they deserve their own
  exercises :)
8 years ago
Carol (Nichols || Goulding) d0f4ee1b39 Merge remote-tracking branch 'origin/pr/40' 8 years ago
Carol (Nichols || Goulding) d145c6334f Start an error handling section and move the result exercise there
I think this is a better categorization than "standard library types".
8 years ago
Constantin Berhard 78014c0a73 fixed iterator1 exercise by giving the compiler less clues 8 years ago
Constantin Berhard d989bbebd0 added exercise iterator1 and its solution 8 years ago
Carol (Nichols || Goulding) 7af29d6211 Incorporate Arc exercise from @ConnyOnny!! 🌟 9 years ago
Constantin Berhard 883f31752b Arc1 code added 9 years ago
Carol (Nichols || Goulding) ce3b710b13 Add jdm's Result exercise!! 😹
Fixes #10. Thank you!!!
9 years ago