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

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

Issue 11316059: Add List.first. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add dart2js interceptor and add test. 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/list.dart ('k') | sdk/lib/html/dart2js/html_dart2js.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/core/sequences.dart
diff --git a/sdk/lib/core/sequences.dart b/sdk/lib/core/sequences.dart
index fcf8225afecd7314684b5e76f54165f6084ef326..d671cb5106b3417888b674e7a7d83e345b7602e8 100644
--- a/sdk/lib/core/sequences.dart
+++ b/sdk/lib/core/sequences.dart
@@ -117,6 +117,7 @@ class SequenceList<E> extends SequenceCollection<E> implements List<E> {
return -1;
}
+ E get first => sequence[0];
E get last => sequence[sequence.length - 1];
List<E> getRange(int start, int length) {
« no previous file with comments | « sdk/lib/core/list.dart ('k') | sdk/lib/html/dart2js/html_dart2js.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698