add Iterator::flatten and redefine flat_map(f) in terms of map(f).flatten()
This commit is contained in:
parent
27a046e933
commit
6af23f977c
4 changed files with 84 additions and 47 deletions
|
@ -836,6 +836,8 @@ fn test_iterator_scan() {
|
|||
assert_eq!(i, ys.len());
|
||||
}
|
||||
|
||||
// Note: We test flatten() by testing flat_map().
|
||||
|
||||
#[test]
|
||||
fn test_iterator_flat_map() {
|
||||
let xs = [0, 3, 6];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue