From 0672317bec10248262da17070627fa8f01736788 Mon Sep 17 00:00:00 2001 From: "floitsch@google.com" Date: Fri, 15 Feb 2013 13:57:18 +0000 Subject: [PATCH] Remove deprecated mappedBy. Committed: https://code.google.com/p/dart/source/detail?r=18575 Reverted: http://code.google.com/p/dart/source/detail?r=18576 Review URL: https://codereview.chromium.org//12212213 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18579 260f80e4-7a28-3924-810f-c04153c831b5 --- pkg/http/lib/src/byte_stream.dart | 2 +- pkg/serialization/lib/src/format.dart | 2 +- runtime/lib/array.dart | 8 -- runtime/lib/byte_array.dart | 4 - runtime/lib/growable_array.dart | 4 - sdk/lib/_collection_dev/iterable.dart | 4 - sdk/lib/_collection_dev/list.dart | 16 --- .../compiler/implementation/lib/js_array.dart | 4 - sdk/lib/async/stream.dart | 7 -- sdk/lib/collection/collections.dart | 10 -- sdk/lib/core/iterable.dart | 6 - sdk/lib/html/dart2js/html_dart2js.dart | 113 ------------------ sdk/lib/html/dartium/html_dartium.dart | 113 ------------------ .../html_common/filtered_element_list.dart | 1 - sdk/lib/svg/dart2js/svg_dart2js.dart | 18 --- sdk/lib/svg/dartium/svg_dartium.dart | 18 --- tests/html/element_classes_test.dart | 2 +- tests/html/element_test.dart | 2 +- tests/html/streams_test.dart | 2 +- .../async/stream_controller_async_test.dart | 2 +- tools/dom/src/CssClassSet.dart | 2 - .../html/impl/impl_Element.darttemplate | 8 -- .../html/impl/impl_Node.darttemplate | 4 - .../immutable_list_mixin.darttemplate | 3 - utils/pub/utils.dart | 4 +- utils/template/utils.dart | 2 +- 26 files changed, 9 insertions(+), 352 deletions(-) diff --git a/pkg/http/lib/src/byte_stream.dart b/pkg/http/lib/src/byte_stream.dart index 3ef0b6eede5..f6d87ff1884 100644 --- a/pkg/http/lib/src/byte_stream.dart +++ b/pkg/http/lib/src/byte_stream.dart @@ -35,5 +35,5 @@ class ByteStream extends StreamView> { toBytes().then((bytes) => decodeString(bytes, encoding)); Stream toStringStream([Encoding encoding=Encoding.UTF_8]) => - wrapStream(mappedBy((bytes) => decodeString(bytes, encoding))); + wrapStream(map((bytes) => decodeString(bytes, encoding))); } diff --git a/pkg/serialization/lib/src/format.dart b/pkg/serialization/lib/src/format.dart index a1726f0f5b9..36c8042e7af 100644 --- a/pkg/serialization/lib/src/format.dart +++ b/pkg/serialization/lib/src/format.dart @@ -216,7 +216,7 @@ class SimpleJsonFormat extends Format { } else { throw new SerializationException("Invalid data format"); } - // Do not use mappedBy or other lazy operations for this. They do not play + // Do not use map or other lazy operations for this. They do not play // well with a function that destructively modifies its arguments. var newData = mapValues(data, (each) => recursivelyFixUp(each, r, result)); result[ruleNumber].add(newData); diff --git a/runtime/lib/array.dart b/runtime/lib/array.dart index 0f02eb4c01c..1441dc2a50e 100644 --- a/runtime/lib/array.dart +++ b/runtime/lib/array.dart @@ -104,10 +104,6 @@ class _ObjectArray implements List { return IterableMixinWorkaround.mapList(this, f); } - List mappedBy(f(E element)) { - IterableMixinWorkaround.mappedByList(this, f); - } - reduce(initialValue, combine(previousValue, E element)) { return IterableMixinWorkaround.reduce(this, initialValue, combine); } @@ -338,10 +334,6 @@ class _ImmutableArray implements List { return IterableMixinWorkaround.mapList(this, f); } - List mappedBy(f(E element)) { - return IterableMixinWorkaround.mappedByList(this, f); - } - String join([String separator]) { return IterableMixinWorkaround.joinList(this, separator); } diff --git a/runtime/lib/byte_array.dart b/runtime/lib/byte_array.dart index 14b1b17fb35..7eb126a2afe 100644 --- a/runtime/lib/byte_array.dart +++ b/runtime/lib/byte_array.dart @@ -233,10 +233,6 @@ abstract class _ByteArrayBase { return IterableMixinWorkaround.mapList(this, f); } - List mappedBy(f(int element)) { - return IterableMixinWorkaround.mappedByList(this, f); - } - String join([String separator]) { return IterableMixinWorkaround.join(this, separator); } diff --git a/runtime/lib/growable_array.dart b/runtime/lib/growable_array.dart index d030e64acc1..27699e2efe3 100644 --- a/runtime/lib/growable_array.dart +++ b/runtime/lib/growable_array.dart @@ -246,10 +246,6 @@ class _GrowableObjectArray implements List { return IterableMixinWorkaround.mapList(this, f); } - List mappedBy(f(T element)) { - return IterableMixinWorkaround.mappedByList(this, f); - } - reduce(initialValue, combine(previousValue, T element)) { return IterableMixinWorkaround.reduce(this, initialValue, combine); } diff --git a/sdk/lib/_collection_dev/iterable.dart b/sdk/lib/_collection_dev/iterable.dart index 5df737881d4..676eadec18a 100644 --- a/sdk/lib/_collection_dev/iterable.dart +++ b/sdk/lib/_collection_dev/iterable.dart @@ -197,8 +197,6 @@ abstract class ListIterable extends Iterable { Iterable map(f(E element)) => new MappedIterable(this, f); - Iterable mappedBy(f(E element)) => super.mappedBy(f); - reduce(var initialValue, combine(var previousValue, E element)) { var value = initialValue; int length = this.length; @@ -663,8 +661,6 @@ class EmptyIterable extends Iterable { Iterable map(f(E element)) => const EmptyIterable(); - Iterable mappedBy(f(E element)) => const EmptyIterable(); - reduce(var initialValue, combine(var previousValue, E element)) { return initialValue; } diff --git a/sdk/lib/_collection_dev/list.dart b/sdk/lib/_collection_dev/list.dart index 0260290dc1d..fe698ec7f0e 100644 --- a/sdk/lib/_collection_dev/list.dart +++ b/sdk/lib/_collection_dev/list.dart @@ -97,10 +97,6 @@ abstract class ListBase extends Collection implements List { return new MappedIterable(this, f); } - List mappedBy(f(E element)) { - return new MappedList(this, f); - } - Iterable take(int n) { return new SubListIterable(this, 0, n); } @@ -286,18 +282,6 @@ abstract class UnmodifiableListBase extends ListBase { } } -class MappedList extends UnmodifiableListBase { - final List _list; - // TODO(ahe): Restore type when feature is implemented in dart2js - // checked mode. http://dartbug.com/7733 - final /* _Transformation */ _f; - - MappedList(this._list, T this._f(S element)); - - T operator[](int index) => _f(_list[index]); - int get length => _list.length; -} - /** An empty fixed-length list. */ class EmptyList extends FixedLengthListBase { int get length => 0; diff --git a/sdk/lib/_internal/compiler/implementation/lib/js_array.dart b/sdk/lib/_internal/compiler/implementation/lib/js_array.dart index 91a6782fd96..1c1e4920dbf 100644 --- a/sdk/lib/_internal/compiler/implementation/lib/js_array.dart +++ b/sdk/lib/_internal/compiler/implementation/lib/js_array.dart @@ -92,10 +92,6 @@ class JSArray implements List { return IterableMixinWorkaround.mapList(this, f); } - List mappedBy(f(E element)) { - return IterableMixinWorkaround.mappedByList(this, f); - } - String join([String separator]) { if (separator == null) separator = ""; var list = new List(this.length); diff --git a/sdk/lib/async/stream.dart b/sdk/lib/async/stream.dart index c713d9e8738..a026484e214 100644 --- a/sdk/lib/async/stream.dart +++ b/sdk/lib/async/stream.dart @@ -133,13 +133,6 @@ abstract class Stream { return new _MapStream(this, convert); } - /** - * Deprecated alias for [map]. - * - * @deprecated - */ - Stream mappedBy(f(T element)) => map(f); - /** * Create a wrapper Stream that intercepts some errors from this stream. * diff --git a/sdk/lib/collection/collections.dart b/sdk/lib/collection/collections.dart index 06aa7677c73..fc27c9158e9 100644 --- a/sdk/lib/collection/collections.dart +++ b/sdk/lib/collection/collections.dart @@ -321,11 +321,6 @@ class IterableMixinWorkaround { return new MappedListIterable(list, f); } - static List mappedByList(List list, f(var element)) { - // This is currently a List as well as an Iterable. - return new MappedList(list, f); - } - static Iterable expand(Iterable iterable, Iterable f(var element)) { return new ExpandIterable(iterable, f); } @@ -472,11 +467,6 @@ class Collections { static Iterable where(Iterable iterable, bool f(var element)) => IterableMixinWorkaround.where(iterable, f); - /** Deprecated. Use the same method in [IterableMixinWorkaround] instead.*/ - @deprecated - static List mappedByList(List list, f(var element)) - => IterableMixinWorkaround.mappedByList(list, f); - /** Deprecated. Use the same method in [IterableMixinWorkaround] instead.*/ @deprecated static Iterable takeList(List list, int n) diff --git a/sdk/lib/core/iterable.dart b/sdk/lib/core/iterable.dart index 56e96ef048a..618eeb8b4cc 100644 --- a/sdk/lib/core/iterable.dart +++ b/sdk/lib/core/iterable.dart @@ -50,12 +50,6 @@ abstract class Iterable { */ Iterable map(f(E element)) => new MappedIterable(this, f); - /** - * Deprecated alias for [map]. - */ - @deprecated - Iterable mappedBy(f(E element)) => map(f); - /** * Returns a lazy [Iterable] with all elements that satisfy the * predicate [f]. diff --git a/sdk/lib/html/dart2js/html_dart2js.dart b/sdk/lib/html/dart2js/html_dart2js.dart index 406cb2a3101..3420affd172 100644 --- a/sdk/lib/html/dart2js/html_dart2js.dart +++ b/sdk/lib/html/dart2js/html_dart2js.dart @@ -7197,9 +7197,6 @@ class DomMimeTypeArray implements JavaScriptIndexingBehavior, List Iterable map(f(DomMimeType element)) => IterableMixinWorkaround.mapList(this, f); - List mappedBy(f(DomMimeType element)) => - IterableMixinWorkaround.mappedByList(this, f); - Iterable where(bool f(DomMimeType element)) => IterableMixinWorkaround.where(this, f); @@ -7454,9 +7451,6 @@ class DomPluginArray implements JavaScriptIndexingBehavior, List nati Iterable map(f(DomPlugin element)) => IterableMixinWorkaround.mapList(this, f); - List mappedBy(f(DomPlugin element)) => - IterableMixinWorkaround.mappedByList(this, f); - Iterable where(bool f(DomPlugin element)) => IterableMixinWorkaround.where(this, f); @@ -7818,9 +7812,6 @@ class DomStringList implements JavaScriptIndexingBehavior, List native " Iterable map(f(String element)) => IterableMixinWorkaround.mapList(this, f); - List mappedBy(f(String element)) => - IterableMixinWorkaround.mappedByList(this, f); - Iterable where(bool f(String element)) => IterableMixinWorkaround.where(this, f); @@ -8081,10 +8072,6 @@ class _ChildrenElementList implements List { return IterableMixinWorkaround.mapList(this, f); } - List mappedBy(f(Element element)) { - return IterableMixinWorkaround.mappedByList(this, f); - } - Iterable where(bool f(Element element)) { return IterableMixinWorkaround.where(this, f); } @@ -8306,10 +8293,6 @@ class _FrozenElementList implements List { return IterableMixinWorkaround.mapList(this, f); } - List mappedBy(f(Element element)) { - return IterableMixinWorkaround.mappedByList(this, f); - } - Iterable where(bool f(Element element)) { return IterableMixinWorkaround.where(this, f); } @@ -10660,9 +10643,6 @@ class FileList implements JavaScriptIndexingBehavior, List native "*FileLi Iterable map(f(File element)) => IterableMixinWorkaround.mapList(this, f); - List mappedBy(f(File element)) => - IterableMixinWorkaround.mappedByList(this, f); - Iterable where(bool f(File element)) => IterableMixinWorkaround.where(this, f); @@ -11220,9 +11200,6 @@ class Float32Array extends ArrayBufferView implements JavaScriptIndexingBehavior Iterable map(f(num element)) => IterableMixinWorkaround.mapList(this, f); - List mappedBy(f(num element)) => - IterableMixinWorkaround.mappedByList(this, f); - Iterable where(bool f(num element)) => IterableMixinWorkaround.where(this, f); @@ -11439,9 +11416,6 @@ class Float64Array extends ArrayBufferView implements JavaScriptIndexingBehavior Iterable map(f(num element)) => IterableMixinWorkaround.mapList(this, f); - List mappedBy(f(num element)) => - IterableMixinWorkaround.mappedByList(this, f); - Iterable where(bool f(num element)) => IterableMixinWorkaround.where(this, f); @@ -11967,9 +11941,6 @@ class HtmlAllCollection implements JavaScriptIndexingBehavior, List native Iterable map(f(Node element)) => IterableMixinWorkaround.mapList(this, f); - List mappedBy(f(Node element)) => - IterableMixinWorkaround.mappedByList(this, f); - Iterable where(bool f(Node element)) => IterableMixinWorkaround.where(this, f); @@ -12177,9 +12148,6 @@ class HtmlCollection implements JavaScriptIndexingBehavior, List native "* Iterable map(f(Node element)) => IterableMixinWorkaround.mapList(this, f); - List mappedBy(f(Node element)) => - IterableMixinWorkaround.mappedByList(this, f); - Iterable where(bool f(Node element)) => IterableMixinWorkaround.where(this, f); @@ -14199,9 +14167,6 @@ class Int16Array extends ArrayBufferView implements JavaScriptIndexingBehavior, Iterable map(f(int element)) => IterableMixinWorkaround.mapList(this, f); - List mappedBy(f(int element)) => - IterableMixinWorkaround.mappedByList(this, f); - Iterable where(bool f(int element)) => IterableMixinWorkaround.where(this, f); @@ -14418,9 +14383,6 @@ class Int32Array extends ArrayBufferView implements JavaScriptIndexingBehavior, Iterable map(f(int element)) => IterableMixinWorkaround.mapList(this, f); - List mappedBy(f(int element)) => - IterableMixinWorkaround.mappedByList(this, f); - Iterable where(bool f(int element)) => IterableMixinWorkaround.where(this, f); @@ -14637,9 +14599,6 @@ class Int8Array extends ArrayBufferView implements JavaScriptIndexingBehavior, L Iterable map(f(int element)) => IterableMixinWorkaround.mapList(this, f); - List mappedBy(f(int element)) => - IterableMixinWorkaround.mappedByList(this, f); - Iterable where(bool f(int element)) => IterableMixinWorkaround.where(this, f); @@ -17143,10 +17102,6 @@ class _ChildNodeListLazy implements List { return IterableMixinWorkaround.mapList(this, f); } - List mappedBy(f(Node element)) { - return IterableMixinWorkaround.mappedByList(this, f); - } - Iterable where(bool f(Node element)) { return IterableMixinWorkaround.where(this, f); } @@ -17538,9 +17493,6 @@ class NodeList implements JavaScriptIndexingBehavior, List native "*NodeLi Iterable map(f(Node element)) => IterableMixinWorkaround.mapList(this, f); - List mappedBy(f(Node element)) => - IterableMixinWorkaround.mappedByList(this, f); - Iterable where(bool f(Node element)) => IterableMixinWorkaround.where(this, f); @@ -19856,9 +19808,6 @@ class SourceBufferList extends EventTarget implements JavaScriptIndexingBehavior Iterable map(f(SourceBuffer element)) => IterableMixinWorkaround.mapList(this, f); - List mappedBy(f(SourceBuffer element)) => - IterableMixinWorkaround.mappedByList(this, f); - Iterable where(bool f(SourceBuffer element)) => IterableMixinWorkaround.where(this, f); @@ -20139,9 +20088,6 @@ class SpeechGrammarList implements JavaScriptIndexingBehavior, List IterableMixinWorkaround.mapList(this, f); - List mappedBy(f(SpeechGrammar element)) => - IterableMixinWorkaround.mappedByList(this, f); - Iterable where(bool f(SpeechGrammar element)) => IterableMixinWorkaround.where(this, f); @@ -20710,9 +20656,6 @@ class SqlResultSetRowList implements JavaScriptIndexingBehavior, List nativ Iterable map(f(Map element)) => IterableMixinWorkaround.mapList(this, f); - List mappedBy(f(Map element)) => - IterableMixinWorkaround.mappedByList(this, f); - Iterable where(bool f(Map element)) => IterableMixinWorkaround.where(this, f); @@ -21796,9 +21739,6 @@ class TextTrackCueList implements List, JavaScriptIndexingBehavior Iterable map(f(TextTrackCue element)) => IterableMixinWorkaround.mapList(this, f); - List mappedBy(f(TextTrackCue element)) => - IterableMixinWorkaround.mappedByList(this, f); - Iterable where(bool f(TextTrackCue element)) => IterableMixinWorkaround.where(this, f); @@ -22004,9 +21944,6 @@ class TextTrackList extends EventTarget implements JavaScriptIndexingBehavior, L Iterable map(f(TextTrack element)) => IterableMixinWorkaround.mapList(this, f); - List mappedBy(f(TextTrack element)) => - IterableMixinWorkaround.mappedByList(this, f); - Iterable where(bool f(TextTrack element)) => IterableMixinWorkaround.where(this, f); @@ -22419,9 +22356,6 @@ class TouchList implements JavaScriptIndexingBehavior, List native "*Touc Iterable map(f(Touch element)) => IterableMixinWorkaround.mapList(this, f); - List mappedBy(f(Touch element)) => - IterableMixinWorkaround.mappedByList(this, f); - Iterable where(bool f(Touch element)) => IterableMixinWorkaround.where(this, f); @@ -22868,9 +22802,6 @@ class Uint16Array extends ArrayBufferView implements JavaScriptIndexingBehavior, Iterable map(f(int element)) => IterableMixinWorkaround.mapList(this, f); - List mappedBy(f(int element)) => - IterableMixinWorkaround.mappedByList(this, f); - Iterable where(bool f(int element)) => IterableMixinWorkaround.where(this, f); @@ -23087,9 +23018,6 @@ class Uint32Array extends ArrayBufferView implements JavaScriptIndexingBehavior, Iterable map(f(int element)) => IterableMixinWorkaround.mapList(this, f); - List mappedBy(f(int element)) => - IterableMixinWorkaround.mappedByList(this, f); - Iterable where(bool f(int element)) => IterableMixinWorkaround.where(this, f); @@ -23306,9 +23234,6 @@ class Uint8Array extends ArrayBufferView implements JavaScriptIndexingBehavior, Iterable map(f(int element)) => IterableMixinWorkaround.mapList(this, f); - List mappedBy(f(int element)) => - IterableMixinWorkaround.mappedByList(this, f); - Iterable where(bool f(int element)) => IterableMixinWorkaround.where(this, f); @@ -23522,9 +23447,6 @@ class Uint8ClampedArray extends Uint8Array implements JavaScriptIndexingBehavior Iterable map(f(int element)) => IterableMixinWorkaround.mapList(this, f); - List mappedBy(f(int element)) => - IterableMixinWorkaround.mappedByList(this, f); - Iterable where(bool f(int element)) => IterableMixinWorkaround.where(this, f); @@ -27241,9 +27163,6 @@ class _ClientRectList implements JavaScriptIndexingBehavior, List na Iterable map(f(ClientRect element)) => IterableMixinWorkaround.mapList(this, f); - List mappedBy(f(ClientRect element)) => - IterableMixinWorkaround.mappedByList(this, f); - Iterable where(bool f(ClientRect element)) => IterableMixinWorkaround.where(this, f); @@ -27441,9 +27360,6 @@ class _CssRuleList implements JavaScriptIndexingBehavior, List native " Iterable map(f(CssRule element)) => IterableMixinWorkaround.mapList(this, f); - List mappedBy(f(CssRule element)) => - IterableMixinWorkaround.mappedByList(this, f); - Iterable where(bool f(CssRule element)) => IterableMixinWorkaround.where(this, f); @@ -27641,9 +27557,6 @@ class _CssValueList extends CssValue implements List, JavaScriptIndexi Iterable map(f(CssValue element)) => IterableMixinWorkaround.mapList(this, f); - List mappedBy(f(CssValue element)) => - IterableMixinWorkaround.mappedByList(this, f); - Iterable where(bool f(CssValue element)) => IterableMixinWorkaround.where(this, f); @@ -27841,9 +27754,6 @@ class _EntryArray implements JavaScriptIndexingBehavior, List native "*En Iterable map(f(Entry element)) => IterableMixinWorkaround.mapList(this, f); - List mappedBy(f(Entry element)) => - IterableMixinWorkaround.mappedByList(this, f); - Iterable where(bool f(Entry element)) => IterableMixinWorkaround.where(this, f); @@ -28041,9 +27951,6 @@ class _EntryArraySync implements JavaScriptIndexingBehavior, List nat Iterable map(f(EntrySync element)) => IterableMixinWorkaround.mapList(this, f); - List mappedBy(f(EntrySync element)) => - IterableMixinWorkaround.mappedByList(this, f); - Iterable where(bool f(EntrySync element)) => IterableMixinWorkaround.where(this, f); @@ -28241,9 +28148,6 @@ class _GamepadList implements JavaScriptIndexingBehavior, List native " Iterable map(f(Gamepad element)) => IterableMixinWorkaround.mapList(this, f); - List mappedBy(f(Gamepad element)) => - IterableMixinWorkaround.mappedByList(this, f); - Iterable where(bool f(Gamepad element)) => IterableMixinWorkaround.where(this, f); @@ -28504,9 +28408,6 @@ class _MediaStreamList implements JavaScriptIndexingBehavior, List Iterable map(f(MediaStream element)) => IterableMixinWorkaround.mapList(this, f); - List mappedBy(f(MediaStream element)) => - IterableMixinWorkaround.mappedByList(this, f); - Iterable where(bool f(MediaStream element)) => IterableMixinWorkaround.where(this, f); @@ -28704,9 +28605,6 @@ class _NamedNodeMap implements JavaScriptIndexingBehavior, List native "*N Iterable map(f(Node element)) => IterableMixinWorkaround.mapList(this, f); - List mappedBy(f(Node element)) => - IterableMixinWorkaround.mappedByList(this, f); - Iterable where(bool f(Node element)) => IterableMixinWorkaround.where(this, f); @@ -28928,9 +28826,6 @@ class _SpeechInputResultList implements JavaScriptIndexingBehavior, List IterableMixinWorkaround.mapList(this, f); - List mappedBy(f(SpeechInputResult element)) => - IterableMixinWorkaround.mappedByList(this, f); - Iterable where(bool f(SpeechInputResult element)) => IterableMixinWorkaround.where(this, f); @@ -29128,9 +29023,6 @@ class _SpeechRecognitionResultList implements JavaScriptIndexingBehavior, List IterableMixinWorkaround.mapList(this, f); - List mappedBy(f(SpeechRecognitionResult element)) => - IterableMixinWorkaround.mappedByList(this, f); - Iterable where(bool f(SpeechRecognitionResult element)) => IterableMixinWorkaround.where(this, f); @@ -29328,9 +29220,6 @@ class _StyleSheetList implements JavaScriptIndexingBehavior, List na Iterable map(f(StyleSheet element)) => IterableMixinWorkaround.mapList(this, f); - List mappedBy(f(StyleSheet element)) => - IterableMixinWorkaround.mappedByList(this, f); - Iterable where(bool f(StyleSheet element)) => IterableMixinWorkaround.where(this, f); @@ -29903,8 +29792,6 @@ abstract class CssClassSet implements Set { Iterable map(f(String element)) => readClasses().map(f); - Iterable mappedBy(f(String element)) => readClasses().mappedBy(f); - Iterable where(bool f(String element)) => readClasses().where(f); Iterable expand(Iterable f(String element)) => readClasses.expand(f); diff --git a/sdk/lib/html/dartium/html_dartium.dart b/sdk/lib/html/dartium/html_dartium.dart index 47695429509..8a3b951ff14 100644 --- a/sdk/lib/html/dartium/html_dartium.dart +++ b/sdk/lib/html/dartium/html_dartium.dart @@ -7898,9 +7898,6 @@ class DomMimeTypeArray extends NativeFieldWrapperClass1 implements List IterableMixinWorkaround.mapList(this, f); - List mappedBy(f(DomMimeType element)) => - IterableMixinWorkaround.mappedByList(this, f); - Iterable where(bool f(DomMimeType element)) => IterableMixinWorkaround.where(this, f); @@ -8169,9 +8166,6 @@ class DomPluginArray extends NativeFieldWrapperClass1 implements List Iterable map(f(DomPlugin element)) => IterableMixinWorkaround.mapList(this, f); - List mappedBy(f(DomPlugin element)) => - IterableMixinWorkaround.mappedByList(this, f); - Iterable where(bool f(DomPlugin element)) => IterableMixinWorkaround.where(this, f); @@ -8558,9 +8552,6 @@ class DomStringList extends NativeFieldWrapperClass1 implements List { Iterable map(f(String element)) => IterableMixinWorkaround.mapList(this, f); - List mappedBy(f(String element)) => - IterableMixinWorkaround.mappedByList(this, f); - Iterable where(bool f(String element)) => IterableMixinWorkaround.where(this, f); @@ -8842,10 +8833,6 @@ class _ChildrenElementList implements List { return IterableMixinWorkaround.mapList(this, f); } - List mappedBy(f(Element element)) { - return IterableMixinWorkaround.mappedByList(this, f); - } - Iterable where(bool f(Element element)) { return IterableMixinWorkaround.where(this, f); } @@ -9067,10 +9054,6 @@ class _FrozenElementList implements List { return IterableMixinWorkaround.mapList(this, f); } - List mappedBy(f(Element element)) { - return IterableMixinWorkaround.mappedByList(this, f); - } - Iterable where(bool f(Element element)) { return IterableMixinWorkaround.where(this, f); } @@ -11396,9 +11379,6 @@ class FileList extends NativeFieldWrapperClass1 implements List { Iterable map(f(File element)) => IterableMixinWorkaround.mapList(this, f); - List mappedBy(f(File element)) => - IterableMixinWorkaround.mappedByList(this, f); - Iterable where(bool f(File element)) => IterableMixinWorkaround.where(this, f); @@ -12010,9 +11990,6 @@ class Float32Array extends ArrayBufferView implements List { Iterable map(f(num element)) => IterableMixinWorkaround.mapList(this, f); - List mappedBy(f(num element)) => - IterableMixinWorkaround.mappedByList(this, f); - Iterable where(bool f(num element)) => IterableMixinWorkaround.where(this, f); @@ -12248,9 +12225,6 @@ class Float64Array extends ArrayBufferView implements List { Iterable map(f(num element)) => IterableMixinWorkaround.mapList(this, f); - List mappedBy(f(num element)) => - IterableMixinWorkaround.mappedByList(this, f); - Iterable where(bool f(num element)) => IterableMixinWorkaround.where(this, f); @@ -12846,9 +12820,6 @@ class HtmlAllCollection extends NativeFieldWrapperClass1 implements List { Iterable map(f(Node element)) => IterableMixinWorkaround.mapList(this, f); - List mappedBy(f(Node element)) => - IterableMixinWorkaround.mappedByList(this, f); - Iterable where(bool f(Node element)) => IterableMixinWorkaround.where(this, f); @@ -13058,9 +13029,6 @@ class HtmlCollection extends NativeFieldWrapperClass1 implements List { Iterable map(f(Node element)) => IterableMixinWorkaround.mapList(this, f); - List mappedBy(f(Node element)) => - IterableMixinWorkaround.mappedByList(this, f); - Iterable where(bool f(Node element)) => IterableMixinWorkaround.where(this, f); @@ -15419,9 +15387,6 @@ class Int16Array extends ArrayBufferView implements List { Iterable map(f(int element)) => IterableMixinWorkaround.mapList(this, f); - List mappedBy(f(int element)) => - IterableMixinWorkaround.mappedByList(this, f); - Iterable where(bool f(int element)) => IterableMixinWorkaround.where(this, f); @@ -15657,9 +15622,6 @@ class Int32Array extends ArrayBufferView implements List { Iterable map(f(int element)) => IterableMixinWorkaround.mapList(this, f); - List mappedBy(f(int element)) => - IterableMixinWorkaround.mappedByList(this, f); - Iterable where(bool f(int element)) => IterableMixinWorkaround.where(this, f); @@ -15895,9 +15857,6 @@ class Int8Array extends ArrayBufferView implements List { Iterable map(f(int element)) => IterableMixinWorkaround.mapList(this, f); - List mappedBy(f(int element)) => - IterableMixinWorkaround.mappedByList(this, f); - Iterable where(bool f(int element)) => IterableMixinWorkaround.where(this, f); @@ -18680,10 +18639,6 @@ class _ChildNodeListLazy implements List { return IterableMixinWorkaround.mapList(this, f); } - List mappedBy(f(Node element)) { - return IterableMixinWorkaround.mappedByList(this, f); - } - Iterable where(bool f(Node element)) { return IterableMixinWorkaround.where(this, f); } @@ -19072,9 +19027,6 @@ class NodeList extends NativeFieldWrapperClass1 implements List { Iterable map(f(Node element)) => IterableMixinWorkaround.mapList(this, f); - List mappedBy(f(Node element)) => - IterableMixinWorkaround.mappedByList(this, f); - Iterable where(bool f(Node element)) => IterableMixinWorkaround.where(this, f); @@ -21697,9 +21649,6 @@ class SourceBufferList extends EventTarget implements List { Iterable map(f(SourceBuffer element)) => IterableMixinWorkaround.mapList(this, f); - List mappedBy(f(SourceBuffer element)) => - IterableMixinWorkaround.mappedByList(this, f); - Iterable where(bool f(SourceBuffer element)) => IterableMixinWorkaround.where(this, f); @@ -22018,9 +21967,6 @@ class SpeechGrammarList extends NativeFieldWrapperClass1 implements List IterableMixinWorkaround.mapList(this, f); - List mappedBy(f(SpeechGrammar element)) => - IterableMixinWorkaround.mappedByList(this, f); - Iterable where(bool f(SpeechGrammar element)) => IterableMixinWorkaround.where(this, f); @@ -22676,9 +22622,6 @@ class SqlResultSetRowList extends NativeFieldWrapperClass1 implements List Iterable map(f(Map element)) => IterableMixinWorkaround.mapList(this, f); - List mappedBy(f(Map element)) => - IterableMixinWorkaround.mappedByList(this, f); - Iterable where(bool f(Map element)) => IterableMixinWorkaround.where(this, f); @@ -23998,9 +23941,6 @@ class TextTrackCueList extends NativeFieldWrapperClass1 implements List IterableMixinWorkaround.mapList(this, f); - List mappedBy(f(TextTrackCue element)) => - IterableMixinWorkaround.mappedByList(this, f); - Iterable where(bool f(TextTrackCue element)) => IterableMixinWorkaround.where(this, f); @@ -24210,9 +24150,6 @@ class TextTrackList extends EventTarget implements List { Iterable map(f(TextTrack element)) => IterableMixinWorkaround.mapList(this, f); - List mappedBy(f(TextTrack element)) => - IterableMixinWorkaround.mappedByList(this, f); - Iterable where(bool f(TextTrack element)) => IterableMixinWorkaround.where(this, f); @@ -24629,9 +24566,6 @@ class TouchList extends NativeFieldWrapperClass1 implements List { Iterable map(f(Touch element)) => IterableMixinWorkaround.mapList(this, f); - List mappedBy(f(Touch element)) => - IterableMixinWorkaround.mappedByList(this, f); - Iterable where(bool f(Touch element)) => IterableMixinWorkaround.where(this, f); @@ -25123,9 +25057,6 @@ class Uint16Array extends ArrayBufferView implements List { Iterable map(f(int element)) => IterableMixinWorkaround.mapList(this, f); - List mappedBy(f(int element)) => - IterableMixinWorkaround.mappedByList(this, f); - Iterable where(bool f(int element)) => IterableMixinWorkaround.where(this, f); @@ -25361,9 +25292,6 @@ class Uint32Array extends ArrayBufferView implements List { Iterable map(f(int element)) => IterableMixinWorkaround.mapList(this, f); - List mappedBy(f(int element)) => - IterableMixinWorkaround.mappedByList(this, f); - Iterable where(bool f(int element)) => IterableMixinWorkaround.where(this, f); @@ -25599,9 +25527,6 @@ class Uint8Array extends ArrayBufferView implements List { Iterable map(f(int element)) => IterableMixinWorkaround.mapList(this, f); - List mappedBy(f(int element)) => - IterableMixinWorkaround.mappedByList(this, f); - Iterable where(bool f(int element)) => IterableMixinWorkaround.where(this, f); @@ -25835,9 +25760,6 @@ class Uint8ClampedArray extends Uint8Array implements List { Iterable map(f(int element)) => IterableMixinWorkaround.mapList(this, f); - List mappedBy(f(int element)) => - IterableMixinWorkaround.mappedByList(this, f); - Iterable where(bool f(int element)) => IterableMixinWorkaround.where(this, f); @@ -29513,9 +29435,6 @@ class _ClientRectList extends NativeFieldWrapperClass1 implements List IterableMixinWorkaround.mapList(this, f); - List mappedBy(f(ClientRect element)) => - IterableMixinWorkaround.mappedByList(this, f); - Iterable where(bool f(ClientRect element)) => IterableMixinWorkaround.where(this, f); @@ -29717,9 +29636,6 @@ class _CssRuleList extends NativeFieldWrapperClass1 implements List { Iterable map(f(CssRule element)) => IterableMixinWorkaround.mapList(this, f); - List mappedBy(f(CssRule element)) => - IterableMixinWorkaround.mappedByList(this, f); - Iterable where(bool f(CssRule element)) => IterableMixinWorkaround.where(this, f); @@ -29921,9 +29837,6 @@ class _CssValueList extends CssValue implements List { Iterable map(f(CssValue element)) => IterableMixinWorkaround.mapList(this, f); - List mappedBy(f(CssValue element)) => - IterableMixinWorkaround.mappedByList(this, f); - Iterable where(bool f(CssValue element)) => IterableMixinWorkaround.where(this, f); @@ -30268,9 +30181,6 @@ class _EntryArray extends NativeFieldWrapperClass1 implements List { Iterable map(f(Entry element)) => IterableMixinWorkaround.mapList(this, f); - List mappedBy(f(Entry element)) => - IterableMixinWorkaround.mappedByList(this, f); - Iterable where(bool f(Entry element)) => IterableMixinWorkaround.where(this, f); @@ -30472,9 +30382,6 @@ class _EntryArraySync extends NativeFieldWrapperClass1 implements List IterableMixinWorkaround.mapList(this, f); - List mappedBy(f(EntrySync element)) => - IterableMixinWorkaround.mappedByList(this, f); - Iterable where(bool f(EntrySync element)) => IterableMixinWorkaround.where(this, f); @@ -30676,9 +30583,6 @@ class _GamepadList extends NativeFieldWrapperClass1 implements List { Iterable map(f(Gamepad element)) => IterableMixinWorkaround.mapList(this, f); - List mappedBy(f(Gamepad element)) => - IterableMixinWorkaround.mappedByList(this, f); - Iterable where(bool f(Gamepad element)) => IterableMixinWorkaround.where(this, f); @@ -30971,9 +30875,6 @@ class _MediaStreamList extends NativeFieldWrapperClass1 implements List IterableMixinWorkaround.mapList(this, f); - List mappedBy(f(MediaStream element)) => - IterableMixinWorkaround.mappedByList(this, f); - Iterable where(bool f(MediaStream element)) => IterableMixinWorkaround.where(this, f); @@ -31175,9 +31076,6 @@ class _NamedNodeMap extends NativeFieldWrapperClass1 implements List { Iterable map(f(Node element)) => IterableMixinWorkaround.mapList(this, f); - List mappedBy(f(Node element)) => - IterableMixinWorkaround.mappedByList(this, f); - Iterable where(bool f(Node element)) => IterableMixinWorkaround.where(this, f); @@ -31403,9 +31301,6 @@ class _SpeechInputResultList extends NativeFieldWrapperClass1 implements List IterableMixinWorkaround.mapList(this, f); - List mappedBy(f(SpeechInputResult element)) => - IterableMixinWorkaround.mappedByList(this, f); - Iterable where(bool f(SpeechInputResult element)) => IterableMixinWorkaround.where(this, f); @@ -31607,9 +31502,6 @@ class _SpeechRecognitionResultList extends NativeFieldWrapperClass1 implements L Iterable map(f(SpeechRecognitionResult element)) => IterableMixinWorkaround.mapList(this, f); - List mappedBy(f(SpeechRecognitionResult element)) => - IterableMixinWorkaround.mappedByList(this, f); - Iterable where(bool f(SpeechRecognitionResult element)) => IterableMixinWorkaround.where(this, f); @@ -31811,9 +31703,6 @@ class _StyleSheetList extends NativeFieldWrapperClass1 implements List IterableMixinWorkaround.mapList(this, f); - List mappedBy(f(StyleSheet element)) => - IterableMixinWorkaround.mappedByList(this, f); - Iterable where(bool f(StyleSheet element)) => IterableMixinWorkaround.where(this, f); @@ -32388,8 +32277,6 @@ abstract class CssClassSet implements Set { Iterable map(f(String element)) => readClasses().map(f); - Iterable mappedBy(f(String element)) => readClasses().mappedBy(f); - Iterable where(bool f(String element)) => readClasses().where(f); Iterable expand(Iterable f(String element)) => readClasses.expand(f); diff --git a/sdk/lib/html/html_common/filtered_element_list.dart b/sdk/lib/html/html_common/filtered_element_list.dart index 9820f1ac85c..9337e6b27c4 100644 --- a/sdk/lib/html/html_common/filtered_element_list.dart +++ b/sdk/lib/html/html_common/filtered_element_list.dart @@ -102,7 +102,6 @@ class FilteredElementList implements List { } Iterable map(f(Element element)) => _filtered.map(f); - List mappedBy(f(Element element)) => _filtered.mappedBy(f); Iterable where(bool f(Element element)) => _filtered.where(f); Iterable expand(Iterable f(Element element)) => _filtered.expand(f); diff --git a/sdk/lib/svg/dart2js/svg_dart2js.dart b/sdk/lib/svg/dart2js/svg_dart2js.dart index df439d6ce97..7543c2a9032 100644 --- a/sdk/lib/svg/dart2js/svg_dart2js.dart +++ b/sdk/lib/svg/dart2js/svg_dart2js.dart @@ -3082,9 +3082,6 @@ class LengthList implements JavaScriptIndexingBehavior, List native "*SV Iterable map(f(Length element)) => IterableMixinWorkaround.mapList(this, f); - List mappedBy(f(Length element)) => - IterableMixinWorkaround.mappedByList(this, f); - Iterable where(bool f(Length element)) => IterableMixinWorkaround.where(this, f); @@ -3709,9 +3706,6 @@ class NumberList implements JavaScriptIndexingBehavior, List native "*SV Iterable map(f(Number element)) => IterableMixinWorkaround.mapList(this, f); - List mappedBy(f(Number element)) => - IterableMixinWorkaround.mappedByList(this, f); - Iterable where(bool f(Number element)) => IterableMixinWorkaround.where(this, f); @@ -4612,9 +4606,6 @@ class PathSegList implements JavaScriptIndexingBehavior, List native "* Iterable map(f(PathSeg element)) => IterableMixinWorkaround.mapList(this, f); - List mappedBy(f(PathSeg element)) => - IterableMixinWorkaround.mappedByList(this, f); - Iterable where(bool f(PathSeg element)) => IterableMixinWorkaround.where(this, f); @@ -5499,9 +5490,6 @@ class StringList implements JavaScriptIndexingBehavior, List native "*SV Iterable map(f(String element)) => IterableMixinWorkaround.mapList(this, f); - List mappedBy(f(String element)) => - IterableMixinWorkaround.mappedByList(this, f); - Iterable where(bool f(String element)) => IterableMixinWorkaround.where(this, f); @@ -6665,9 +6653,6 @@ class TransformList implements List, JavaScriptIndexingBehavior nativ Iterable map(f(Transform element)) => IterableMixinWorkaround.mapList(this, f); - List mappedBy(f(Transform element)) => - IterableMixinWorkaround.mappedByList(this, f); - Iterable where(bool f(Transform element)) => IterableMixinWorkaround.where(this, f); @@ -7185,9 +7170,6 @@ class _ElementInstanceList implements JavaScriptIndexingBehavior, List IterableMixinWorkaround.mapList(this, f); - List mappedBy(f(ElementInstance element)) => - IterableMixinWorkaround.mappedByList(this, f); - Iterable where(bool f(ElementInstance element)) => IterableMixinWorkaround.where(this, f); diff --git a/sdk/lib/svg/dartium/svg_dartium.dart b/sdk/lib/svg/dartium/svg_dartium.dart index 98cb362a64e..c0d430b6076 100644 --- a/sdk/lib/svg/dartium/svg_dartium.dart +++ b/sdk/lib/svg/dartium/svg_dartium.dart @@ -3346,9 +3346,6 @@ class LengthList extends NativeFieldWrapperClass1 implements List { Iterable map(f(Length element)) => IterableMixinWorkaround.mapList(this, f); - List mappedBy(f(Length element)) => - IterableMixinWorkaround.mappedByList(this, f); - Iterable where(bool f(Length element)) => IterableMixinWorkaround.where(this, f); @@ -4050,9 +4047,6 @@ class NumberList extends NativeFieldWrapperClass1 implements List { Iterable map(f(Number element)) => IterableMixinWorkaround.mapList(this, f); - List mappedBy(f(Number element)) => - IterableMixinWorkaround.mappedByList(this, f); - Iterable where(bool f(Number element)) => IterableMixinWorkaround.where(this, f); @@ -5230,9 +5224,6 @@ class PathSegList extends NativeFieldWrapperClass1 implements List { Iterable map(f(PathSeg element)) => IterableMixinWorkaround.mapList(this, f); - List mappedBy(f(PathSeg element)) => - IterableMixinWorkaround.mappedByList(this, f); - Iterable where(bool f(PathSeg element)) => IterableMixinWorkaround.where(this, f); @@ -6215,9 +6206,6 @@ class StringList extends NativeFieldWrapperClass1 implements List { Iterable map(f(String element)) => IterableMixinWorkaround.mapList(this, f); - List mappedBy(f(String element)) => - IterableMixinWorkaround.mappedByList(this, f); - Iterable where(bool f(String element)) => IterableMixinWorkaround.where(this, f); @@ -7470,9 +7458,6 @@ class TransformList extends NativeFieldWrapperClass1 implements List Iterable map(f(Transform element)) => IterableMixinWorkaround.mapList(this, f); - List mappedBy(f(Transform element)) => - IterableMixinWorkaround.mappedByList(this, f); - Iterable where(bool f(Transform element)) => IterableMixinWorkaround.where(this, f); @@ -8044,9 +8029,6 @@ class _ElementInstanceList extends NativeFieldWrapperClass1 implements List IterableMixinWorkaround.mapList(this, f); - List mappedBy(f(ElementInstance element)) => - IterableMixinWorkaround.mappedByList(this, f); - Iterable where(bool f(ElementInstance element)) => IterableMixinWorkaround.where(this, f); diff --git a/tests/html/element_classes_test.dart b/tests/html/element_classes_test.dart index 89434fcbc69..966e5eb1417 100644 --- a/tests/html/element_classes_test.dart +++ b/tests/html/element_classes_test.dart @@ -66,7 +66,7 @@ main() { expect(classes, unorderedEquals(['foo', 'bar', 'baz'])); }); - test('mappedBy', () { + test('map', () { expect(makeClassSet().map((c) => c.toUpperCase()).toList(), unorderedEquals(['FOO', 'BAR', 'BAZ'])); }); diff --git a/tests/html/element_test.dart b/tests/html/element_test.dart index 680face391c..a255c6856dd 100644 --- a/tests/html/element_test.dart +++ b/tests/html/element_test.dart @@ -537,7 +537,7 @@ main() { expect(els[2], isHRElement); }); - test('mappedBy', () { + test('map', () { var texts = getQueryAll().map((el) => el.text).toList(); expect(texts, equals(['Dart!', 'Hello', ''])); }); diff --git a/tests/html/streams_test.dart b/tests/html/streams_test.dart index 8a46b6505dc..3c3f5a22267 100644 --- a/tests/html/streams_test.dart +++ b/tests/html/streams_test.dart @@ -191,7 +191,7 @@ main() { stream.where((_) => true).listen((_) {}); }); - test('mappedBy', () { + test('map', () { stream.map((_) => null).listen((_) {}); }); diff --git a/tests/lib/async/stream_controller_async_test.dart b/tests/lib/async/stream_controller_async_test.dart index 79b85682be7..36278bded8e 100644 --- a/tests/lib/async/stream_controller_async_test.dart +++ b/tests/lib/async/stream_controller_async_test.dart @@ -439,7 +439,7 @@ testRethrow() { } testStream("where", (s, act) => s.where(act)); - testStream("mappedBy", (s, act) => s.map(act)); + testStream("map", (s, act) => s.map(act)); testStream("expand", (s, act) => s.expand(act)); testStream("where", (s, act) => s.where(act)); testStreamError("handleError", (s, act) => s.handleError(act)); diff --git a/tools/dom/src/CssClassSet.dart b/tools/dom/src/CssClassSet.dart index d0181087412..72fdc7e9a9a 100644 --- a/tools/dom/src/CssClassSet.dart +++ b/tools/dom/src/CssClassSet.dart @@ -46,8 +46,6 @@ abstract class CssClassSet implements Set { Iterable map(f(String element)) => readClasses().map(f); - Iterable mappedBy(f(String element)) => readClasses().mappedBy(f); - Iterable where(bool f(String element)) => readClasses().where(f); Iterable expand(Iterable f(String element)) => readClasses.expand(f); diff --git a/tools/dom/templates/html/impl/impl_Element.darttemplate b/tools/dom/templates/html/impl/impl_Element.darttemplate index 5e5f0fccee5..605731c4928 100644 --- a/tools/dom/templates/html/impl/impl_Element.darttemplate +++ b/tools/dom/templates/html/impl/impl_Element.darttemplate @@ -65,10 +65,6 @@ class _ChildrenElementList implements List { return IterableMixinWorkaround.mapList(this, f); } - List mappedBy(f(Element element)) { - return IterableMixinWorkaround.mappedByList(this, f); - } - Iterable where(bool f(Element element)) { return IterableMixinWorkaround.where(this, f); } @@ -290,10 +286,6 @@ class _FrozenElementList implements List { return IterableMixinWorkaround.mapList(this, f); } - List mappedBy(f(Element element)) { - return IterableMixinWorkaround.mappedByList(this, f); - } - Iterable where(bool f(Element element)) { return IterableMixinWorkaround.where(this, f); } diff --git a/tools/dom/templates/html/impl/impl_Node.darttemplate b/tools/dom/templates/html/impl/impl_Node.darttemplate index 4f8e0e5ef30..aee4497e381 100644 --- a/tools/dom/templates/html/impl/impl_Node.darttemplate +++ b/tools/dom/templates/html/impl/impl_Node.darttemplate @@ -145,10 +145,6 @@ $endif return IterableMixinWorkaround.mapList(this, f); } - List mappedBy(f(Node element)) { - return IterableMixinWorkaround.mappedByList(this, f); - } - Iterable where(bool f(Node element)) { return IterableMixinWorkaround.where(this, f); } diff --git a/tools/dom/templates/immutable_list_mixin.darttemplate b/tools/dom/templates/immutable_list_mixin.darttemplate index 3ec2b790f2e..850c2f82ab3 100644 --- a/tools/dom/templates/immutable_list_mixin.darttemplate +++ b/tools/dom/templates/immutable_list_mixin.darttemplate @@ -32,9 +32,6 @@ $endif Iterable map(f($E element)) => IterableMixinWorkaround.mapList(this, f); - List mappedBy(f($E element)) => - IterableMixinWorkaround.mappedByList(this, f); - Iterable<$E> where(bool f($E element)) => IterableMixinWorkaround.where(this, f); diff --git a/utils/pub/utils.dart b/utils/pub/utils.dart index a058e48e686..f7589dae271 100644 --- a/utils/pub/utils.dart +++ b/utils/pub/utils.dart @@ -274,13 +274,13 @@ Stream wrapStream(Stream stream) { /// Like [Iterable.where], but allows [test] to return [Future]s and uses the /// results of those [Future]s as the test. Future futureWhere(Iterable iter, test(value)) { - return Future.wait(iter.mappedBy((e) { + return Future.wait(iter.map((e) { var result = test(e); if (result is! Future) result = new Future.immediate(result); return result.then((result) => new Pair(e, result)); })) .then((pairs) => pairs.where((pair) => pair.last)) - .then((pairs) => pairs.mappedBy((pair) => pair.first)); + .then((pairs) => pairs.map((pair) => pair.first)); } // TODO(nweiz): unify the following functions with the utility functions in diff --git a/utils/template/utils.dart b/utils/template/utils.dart index c9b80422877..ca36fc62491 100644 --- a/utils/template/utils.dart +++ b/utils/template/utils.dart @@ -7,7 +7,7 @@ // TODO(jmesserly): we might want a version of this that return an iterable, // however JS, Python and Ruby versions are all eager. -List mappedBy(Iterable source, mapper(source)) { +List map(Iterable source, mapper(source)) { List result = new List(); if (source is List) { List list = source; // TODO: shouldn't need this