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

Unified Diff: sdk/lib/core/list.dart

Issue 11366111: Make Iterable more powerful (and lazy). (Closed) Base URL: https://dart.googlecode.com/svn/experimental/lib_v2/dart
Patch Set: Fix current. was in Iterable and not Iterator. Created 8 years, 1 month 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
« no previous file with comments | « sdk/lib/core/iterator.dart ('k') | sdk/lib/core/map.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/core/list.dart
diff --git a/sdk/lib/core/list.dart b/sdk/lib/core/list.dart
index b4948a3c1680aa616a39f6b605ea2363296015cb..9addc6d915803d4a6aa01ec99b94a87a543d95db 100644
--- a/sdk/lib/core/list.dart
+++ b/sdk/lib/core/list.dart
@@ -52,9 +52,7 @@ interface List<E> extends Collection<E>, Sequence<E>
void add(E value);
/**
- * Adds [value] at the end of the list, extending the length by
- * one. Throws an [UnsupportedError] if the list is not
- * extendable.
+ * Alias for [add].
*/
void addLast(E value);
@@ -129,6 +127,13 @@ interface List<E> extends Collection<E>, Sequence<E>
E get last;
/**
+ * Returns a read-only view of [this].
+ *
+ * The returned [List] is backed by [this] but cannot change [this].
+ */
+ List<E> get view;
+
+ /**
* Returns a new list containing [length] elements from the list,
* starting at [start].
* Returns an empty list if [length] is 0.
« no previous file with comments | « sdk/lib/core/iterator.dart ('k') | sdk/lib/core/map.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698