| Index: samples/swarm/swarm_ui_lib/util/CollectionUtils.dart
|
| diff --git a/samples/swarm/swarm_ui_lib/util/CollectionUtils.dart b/samples/swarm/swarm_ui_lib/util/CollectionUtils.dart
|
| index ca515b10b3fce49c602eb4981442db2ea98fa307..fd4e2394a4061cb95ad31f54251c88bfe5ae445e 100644
|
| --- a/samples/swarm/swarm_ui_lib/util/CollectionUtils.dart
|
| +++ b/samples/swarm/swarm_ui_lib/util/CollectionUtils.dart
|
| @@ -38,22 +38,6 @@ class CollectionUtils {
|
| }
|
| }
|
|
|
| - // Collection<T> supports most of the ES 5 list methods, but it's missing
|
| - // map.
|
| -
|
| - // TODO(jmesserly): we might want a version of this that return an iterable,
|
| - // however JS, Python and Ruby versions are all eager.
|
| - static List mappedBy(Iterable source, var mapper) {
|
| - // TODO(jmesserly): I was trying to set the capacity here, but instead it
|
| - // seems to create a fixed list. Hence assigning by index below.
|
| - List result = new List(source is List ? (source as List).length : null);
|
| - int i = 0;
|
| - for (final item in source) {
|
| - result[i++] = mapper(item);
|
| - }
|
| - return result;
|
| - }
|
| -
|
| /**
|
| * Finds the item in [source] that matches [test]. Returns null if
|
| * no item matches. The typing should be:
|
|
|