| OLD | NEW |
| 1 part of utilslib; | |
| 2 | |
| 3 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
| 4 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 5 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 6 | 4 |
| 7 typedef num NumericValueSelector<T>(T value); | 5 typedef num NumericValueSelector<T>(T value); |
| 8 | 6 |
| 9 /** | 7 /** |
| 10 * General purpose collection utilities. | 8 * General purpose collection utilities. |
| 11 * TODO(jmesserly): make these top level functions? | 9 * TODO(jmesserly): make these top level functions? |
| 12 */ | 10 */ |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 } | 130 } |
| 133 | 131 |
| 134 // TODO(jmesserly): something like should exist on Map, either a method or a | 132 // TODO(jmesserly): something like should exist on Map, either a method or a |
| 135 // constructor, see bug #5340679 | 133 // constructor, see bug #5340679 |
| 136 static void copyMap(Map dest, Map source) { | 134 static void copyMap(Map dest, Map source) { |
| 137 for (final k in source.getKeys()) { | 135 for (final k in source.getKeys()) { |
| 138 dest[k] = source[k]; | 136 dest[k] = source[k]; |
| 139 } | 137 } |
| 140 } | 138 } |
| 141 } | 139 } |
| OLD | NEW |