Last updated:
0 purchases
recursion iterator
recursion_iterator #
A new Flutter package, iterate a iterator and sub iterator.
Usage #
final iterable = RecursionIterable<int>(() {
int index = 0;
return RecursionIterator((iter) {
if (index < 3) {
int i = ++index;
bool runOver = false;
return iter.iterator(RecursionIterator((iter) {
if (runOver) {
return iter.stop;
} else {
runOver = true;
return iter.iterable([1 * i, 2 * i, 3 * i]);
}
}));
} else {
return iter.stop;
}
});
});
print(iterable.toList()); //[1,2,3,2,4,6,3,6,9]
copied to clipboard
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.