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

Unified Diff: sdk/lib/core/list.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/_internal/compiler/implementation/lib/interceptors.dart ('k') | sdk/lib/core/sequences.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..8dc1577cf9420c1bc37126ff2346c0973776fbcb 100644
--- a/sdk/lib/core/list.dart
+++ b/sdk/lib/core/list.dart
@@ -123,6 +123,12 @@ interface List<E> extends Collection<E>, Sequence<E>
E removeLast();
/**
+ * Returns the first element of the list, or throws an out of bounds
+ * exception if the list is empty.
+ */
+ E get first;
+
+ /**
* Returns the last element of the list, or throws an out of bounds
* exception if the list is empty.
*/
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/lib/interceptors.dart ('k') | sdk/lib/core/sequences.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698