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
This commit is contained in:
@@ -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<Iterable> 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
|
||||
|
||||
Reference in New Issue
Block a user