This commit is contained in:
jungin.rhee
2023-08-22 05:16:34 +00:00
parent d40d4eb562
commit afe2c7b2d2
27 changed files with 312 additions and 192 deletions

View File

@@ -9,7 +9,6 @@ enum Yielded<T> {
}
/// Generator
/// - kk
/// - You can call `next()` method to get the next value.
/// - The generator should stop when it yields `Yielded::Stop`.
///

View File

@@ -3,7 +3,7 @@
//! The primary goal of this assignment is to understand generics, traits, and lifetimes.
//!
//! You should fill out the `todo!()` placeholders in such a way that `/scripts/grade-07.sh` works fine.
//! See `assignment07_grade.rs` and `/scripts/grade-07.sh` for the test script.
//! See `assignment07/*_grade.rs` and `/scripts/grade-07.sh` for the test script.
pub mod generator;
pub mod my_itertools;

View File

@@ -52,7 +52,7 @@ pub fn fib<T>(first: T, second: T) -> impl Iterator<Item = T>
where
T: std::ops::Add<Output = T> + Copy,
{
todo!("remove below");
todo!("replace `std::iter::empty() with your owm implementation`");
std::iter::empty()
}
@@ -86,7 +86,7 @@ impl Iterator for RangeIter {
/// Returns an iterator over the range [left, right) with the given step.
pub fn range(left: Endpoint, right: Endpoint, step: isize) -> impl Iterator<Item = isize> {
todo!("remove below");
todo!("replace `std::iter::empty() with your owm implementation`");
std::iter::empty()
}