An open API service indexing awesome lists of open source software.

https://github.com/harryscholes/iters

Rust iterators and iterator adaptors
https://github.com/harryscholes/iters

Last synced: 2 months ago
JSON representation

Rust iterators and iterator adaptors

Awesome Lists containing this project

README

        

# iters

Rust iterators and iterator adaptors

```rs
assert_eq!(
(1..=5)
.every(2) // Every second element `(1, 3, 5)`
.repeat(2) // Repeat each element twice `(1, 1, 3, 3, 5, 5)`
.times(2) // Repeat the entire iterator twice `(1, 1, 3, 3, 5, 5, 1, 1, 3, 3, 5, 5)`
.collect::>(),
vec![1, 1, 3, 3, 5, 5, 1, 1, 3, 3, 5, 5]
)
```