You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
davidrobert99 b5b6ecc51e roman numbers iter update 3 years ago
..
README.md roman numbers iter update 3 years ago

README.md

roman_numbers_iter

Instructions

Implement the Iterator trait for the RomanNumber type. You should use the code from the previous exercise roman_numbers.

Notions

Expected Functions

//...

impl Iterator for RomanNumber {}

Usage

Here is a program to test your function.

use roman_numbers::RomanNumber;

fn main() {
	let mut number = RomanNumber::from(15);

	println!("{:?}", number);
	println!("{:?}", number.next());
}

And its output

$ cargo run
RomanNumber([X, V])
Some(RomanNumber([X, V, I]))
$