Commit graph

10 commits

Author SHA1 Message Date
Robert Lugg 7d7a48b17d Added filename to top of .rs files 2018-02-21 22:09:53 -08:00
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()
2017-01-05 22:38:07 -05:00
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 :)
2016-04-19 16:00:30 -04:00
Carol (Nichols || Goulding) d0f4ee1b39 Merge remote-tracking branch 'origin/pr/40' 2016-04-16 11:32:10 -04:00
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".
2016-04-16 10:53:39 -04:00
Constantin Berhard 78014c0a73 fixed iterator1 exercise by giving the compiler less clues 2016-04-14 12:48:18 +02:00
Constantin Berhard d989bbebd0 added exercise iterator1 and its solution 2016-04-14 12:16:04 +02:00
Carol (Nichols || Goulding) 7af29d6211 Incorporate Arc exercise from @ConnyOnny!! 🌟 2015-09-30 21:10:26 -04:00
Constantin Berhard 883f31752b Arc1 code added 2015-09-30 21:09:57 -04:00
Carol (Nichols || Goulding) ce3b710b13 Add jdm's Result exercise!! 😹
Fixes #10. Thank you!!!
2015-09-18 21:27:25 -04:00