| Crates.io | unfold-iter |
| lib.rs | unfold-iter |
| version | 0.1.2 |
| created_at | 2025-11-06 23:38:43.450959+00 |
| updated_at | 2026-01-19 19:12:05.225098+00 |
| description | Create iterators with an initial value and a recurrence relation. |
| homepage | |
| repository | https://github.com/balthild/unfold-iter |
| max_upload_size | |
| id | 1920884 |
| size | 4,497 |
Create iterators with an initial value and a recurrence relation.
use unfold_iter::unfold;
for x in unfold(2, |&x| x * 2).take(5) {
println!("{}", x);
}
// 2, 4, 8, 16, 32