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

Unified Diff: sdk/lib/_internal/lib/js_array.dart

Issue 24740003: Add List.shuffle(). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Adddress comments Created 7 years, 3 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
« no previous file with comments | « sdk/lib/_collection_dev/list.dart ('k') | sdk/lib/collection/collection.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/lib/js_array.dart
diff --git a/sdk/lib/_internal/lib/js_array.dart b/sdk/lib/_internal/lib/js_array.dart
index 5718c5d47314f6aca5154b2d5c99d27f2a76628f..b6ec0cbd4453d92e8170a17b0863b1781dcfc8de 100644
--- a/sdk/lib/_internal/lib/js_array.dart
+++ b/sdk/lib/_internal/lib/js_array.dart
@@ -243,6 +243,10 @@ class JSArray<E> extends Interceptor implements List<E>, JSIndexable {
IterableMixinWorkaround.sortList(this, compare);
}
+ void shuffle() {
+ IterableMixinWorkaround.shuffleList(this);
+ }
+
int indexOf(Object element, [int start = 0]) {
return IterableMixinWorkaround.indexOfList(this, element, start);
}
« no previous file with comments | « sdk/lib/_collection_dev/list.dart ('k') | sdk/lib/collection/collection.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698