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

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

Issue 14065011: Implement getRange (returning an Iterable). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fixes and status-file update. Created 7 years, 8 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: sdk/lib/core/list.dart
diff --git a/sdk/lib/core/list.dart b/sdk/lib/core/list.dart
index 12b8aedfb5baa03647163e15411c0d14f47aaa2b..b01209680f3171e4aada57ff4e78239768f02aa0 100644
--- a/sdk/lib/core/list.dart
+++ b/sdk/lib/core/list.dart
@@ -222,7 +222,7 @@ abstract class List<E> implements Collection<E> {
E removeLast();
/**
- * Returns a new list containing the elemenst from [start] to [end].
+ * Returns a new list containing the elements from [start] to [end].
*
* If [end] is omitted, the [length] of the list is used.
*
@@ -232,10 +232,13 @@ abstract class List<E> implements Collection<E> {
List<E> sublist(int start, [int end]);
/**
- * *Deprecated*. Use [sublist] instead.
+ * Returns an [Iterable] that iterators over the elements in the range
+ * [start] to [end] (exclusive). The result of this function is backed by
+ * `this`.
+ *
Lasse Reichstein Nielsen 2013/04/11 10:56:15 Say what happens if the length of `this` changes.
floitsch 2013/04/11 14:12:48 Done.
+ * It is an error if [end] is before [start].
*/
- @deprecated
- List<E> getRange(int start, int length);
+ Iterable<E> getRange(int start, int end);
/**
* Copies [length] elements of [from], starting

Powered by Google App Engine
This is Rietveld 408576698