Functional Control Flow
- What is the ternary operator?
The if condition is the ternary operator but has the unique Rust syntax of if a { b } else { c }
.
- What is another name for unit tests?
Unit tests are also called whitebox testing.
- What is another name for integration tests?
Integration tests are also called blackbox testing.
- What is declarative programming?
Declarative programming avoids implementation details when describing a program.
- What is imperative programming?
Imperative programming focuses on implementation details when describing a program.
- What is defined in the iterator trait?
The iterator trait is defined by an associated Item
type, and the required next
method.
- In which direction will fold traverse the iterator sequence?
fold
will traverse an iterator from left to right, or more specifically, from first to last.
- What is a dependency graph?
A dependency graph is a directed graph that describes the dependency relationships between nodes. In our case, we use this to describe relationships of the form x must happen before y.
- What are the two constructors of
Option
?
Option
can be created as Some(x)
or None
.