unfold-iter 0.1.2

Create iterators with an initial value and a recurrence relation.
Documentation

unfold-iter

Crates.io Docs.rs License

Create iterators with an initial value and a recurrence relation.

Examples

use unfold_iter::unfold;

for x in unfold(2, |&x| x * 2).take(5) {
    println!("{}", x);
}

// 2, 4, 8, 16, 32