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

Unified Diff: packages/isolate/lib/src/lists.dart

Issue 2990843002: Removed fixed dependencies (Closed)
Patch Set: Created 3 years, 5 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 | « packages/isolate/lib/src/errors.dart ('k') | packages/isolate/lib/src/raw_receive_port_multiplexer.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: packages/isolate/lib/src/lists.dart
diff --git a/packages/isolate/lib/src/lists.dart b/packages/isolate/lib/src/lists.dart
new file mode 100644
index 0000000000000000000000000000000000000000..2047ab3d2291dfd47a4778cd7595ca0aff911dbc
--- /dev/null
+++ b/packages/isolate/lib/src/lists.dart
@@ -0,0 +1,31 @@
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+/// Utility functions to create fixed-length lists.
+library isolate.lists;
+
+/// Create a single-element fixed-length list.
+List list1(v1) => new List(1)..[0] = v1;
+
+/// Create a two-element fixed-length list.
+List list2(v1, v2) => new List(2)..[0] = v1
+ ..[1] = v2;
+
+/// Create a three-element fixed-length list.
+List list3(v1, v2, v3) => new List(3)..[0] = v1
+ ..[1] = v2
+ ..[2] = v3;
+
+/// Create a four-element fixed-length list.
+List list4(v1, v2, v3, v4) => new List(4)..[0] = v1
+ ..[1] = v2
+ ..[2] = v3
+ ..[3] = v4;
+
+/// Create a five-element fixed-length list.
+List list5(v1, v2, v3, v4, v5) => new List(5)..[0] = v1
+ ..[1] = v2
+ ..[2] = v3
+ ..[3] = v4
+ ..[4] = v5;
« no previous file with comments | « packages/isolate/lib/src/errors.dart ('k') | packages/isolate/lib/src/raw_receive_port_multiplexer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698