Index: packages/quiver_iterables/lib/src/count.dart |
diff --git a/packages/quiver/lib/src/iterables/concat.dart b/packages/quiver_iterables/lib/src/count.dart |
similarity index 74% |
copy from packages/quiver/lib/src/iterables/concat.dart |
copy to packages/quiver_iterables/lib/src/count.dart |
index b4ab751adb549fe9debce9535a0f780233f14472..093423a08043f53c89514045fe32a1ccee63f360 100644 |
--- a/packages/quiver/lib/src/iterables/concat.dart |
+++ b/packages/quiver_iterables/lib/src/count.dart |
@@ -14,9 +14,11 @@ |
part of quiver.iterables; |
-/** |
- * Returns the concatentation of the input iterables. |
- * |
- * The returned iterable is a lazily-evaluated view on the input iterables. |
- */ |
-Iterable concat(Iterable<Iterable> iterables) => iterables.expand((x) => x); |
+/// Returns an infinite [Iterable] of [num]s, starting from [start] and |
+/// increasing by [step]. |
+Iterable<num> count([num start = 0, num step = 1]) sync* { |
+ while (true) { |
+ yield start; |
+ start += step; |
+ } |
+} |