This issue describes how to implement the loops concept exercise for the Rust track.
Getting started
Please please please read the docs before starting. Posting PRs without reading these docs will be a lot more frustrating for you during the review cycle, and exhaust Exercism's maintainers' time. So, before diving into the implementation, please read up on the following documents:
This concept exercise should convey a basic understanding of loops in Rust. A complete review of all possible loops in a single exercise is infeasible. The primary goal is to introduce the student to the usage of for loops with the x..y pattern, which are the most common type of loop in Rust.
Learning objectives
Student should be able to...
use a for loop
understand the application of the 1..=x range pattern in a for loop
Student may be able to...
use a conditional while loop
use an infinite loop with a break condition
Out of scope
more advanced control flow like while let loops
explicit usage of iterators (even though this is an implicit usage of an iterator!)
Concepts
loops
ranges
patterns
Prerequisites
This exercise should depend only on a basic understanding of functions and variables.
This should require no special changes to the representer.
Analyzer
This should require no special changes to the analyzer.
Implementing
See our implementation guide for guidance. In addition you may want to make use of the shell script while in the concept directory, with the arg loops, e.g. sh boil_exercise.sh loops
Help
If you have any questions while implementing the exercise, please post the questions as comments in this issue.
This issue describes how to implement the loops concept exercise for the Rust track.
Getting started
Please please please read the docs before starting. Posting PRs without reading these docs will be a lot more frustrating for you during the review cycle, and exhaust Exercism's maintainers' time. So, before diving into the implementation, please read up on the following documents:
Please also watch the following video:
Goal
This concept exercise should convey a basic understanding of loops in Rust. A complete review of all possible loops in a single exercise is infeasible. The primary goal is to introduce the student to the usage of
for
loops with thex..y
pattern, which are the most common type of loop in Rust.Learning objectives
Student should be able to...
for
loop1..=x
range pattern in afor
loopStudent may be able to...
while
looploop
with abreak
conditionOut of scope
while let
loopsConcepts
Prerequisites
This exercise should depend only on a basic understanding of functions and variables.
Resources to refer to
Hints
After
Representer
This should require no special changes to the representer.
Analyzer
This should require no special changes to the analyzer.
Implementing
See our implementation guide for guidance. In addition you may want to make use of the shell script while in the
concept
directory, with the arg loops, e.g.sh boil_exercise.sh loops
Help
If you have any questions while implementing the exercise, please post the questions as comments in this issue.