Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(503)

Unified Diff: packages/quiver_iterables/lib/src/enumerate.dart

Issue 2119523002: Added full js & js_util packages (Closed) Base URL: git@github.com:dart-lang/observatory_pub_packages.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: packages/quiver_iterables/lib/src/enumerate.dart
diff --git a/packages/quiver/lib/src/iterables/enumerate.dart b/packages/quiver_iterables/lib/src/enumerate.dart
similarity index 87%
copy from packages/quiver/lib/src/iterables/enumerate.dart
copy to packages/quiver_iterables/lib/src/enumerate.dart
index 72a02a944a4e79c93877ae14bfb038cff53928ca..b0f8e40fe65a754547f368a414135e1f5a59a702 100644
--- a/packages/quiver/lib/src/iterables/enumerate.dart
+++ b/packages/quiver_iterables/lib/src/enumerate.dart
@@ -14,10 +14,8 @@
part of quiver.iterables;
-/**
- * Returns an [Iterable] of [IndexedValue]s where the nth value holds the nth
- * element of [iterable] and its index.
- */
+/// Returns an [Iterable] of [IndexedValue]s where the nth value holds the nth
+/// element of [iterable] and its index.
Iterable<IndexedValue> enumerate(Iterable iterable) =>
new EnumerateIterable(iterable);
@@ -32,10 +30,8 @@ class IndexedValue<V> {
String toString() => '($index, $value)';
}
-/**
- * An [Iterable] of [IndexedValue]s where the nth value holds the nth
- * element of [iterable] and its index. See [enumerate].
- */
+/// An [Iterable] of [IndexedValue]s where the nth value holds the nth
+/// element of [iterable] and its index. See [enumerate].
// This was inspired by MappedIterable internal to Dart collections.
class EnumerateIterable<V> extends IterableBase<IndexedValue<V>> {
final Iterable<V> _iterable;
@@ -57,7 +53,7 @@ class EnumerateIterable<V> extends IterableBase<IndexedValue<V>> {
new IndexedValue<V>(index, _iterable.elementAt(index));
}
-/** The [Iterator] returned by [EnumerateIterable.iterator]. */
+/// The [Iterator] returned by [EnumerateIterable.iterator].
class EnumerateIterator<V> extends Iterator<IndexedValue<V>> {
final Iterator<V> _iterator;
int _index = 0;
« no previous file with comments | « packages/quiver_iterables/lib/src/cycle.dart ('k') | packages/quiver_iterables/lib/src/generating_iterable.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698