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

Unified Diff: runtime/lib/typed_data.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 | « runtime/lib/growable_array.dart ('k') | sdk/lib/_collection_dev/collection_dev.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/typed_data.dart
diff --git a/runtime/lib/typed_data.dart b/runtime/lib/typed_data.dart
index 0f10690aba688d14beddb4bc3f47461402dc50aa..9e2a114e097ba57f770181caeb47b2946c65a1e7 100644
--- a/runtime/lib/typed_data.dart
+++ b/runtime/lib/typed_data.dart
@@ -407,7 +407,11 @@ abstract class _TypedListBase {
}
void sort([int compare(num a, num b)]) {
- return IterableMixinWorkaround.sortList(this, compare);
+ IterableMixinWorkaround.sortList(this, compare);
+ }
+
+ void shuffle() {
+ IterableMixinWorkaround.shuffleList(this);
}
int indexOf(element, [int start = 0]) {
« no previous file with comments | « runtime/lib/growable_array.dart ('k') | sdk/lib/_collection_dev/collection_dev.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698