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

Unified Diff: sdk/lib/core/set.dart

Issue 11377102: Remove named function literals from library and tests (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 1 month 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 | « sdk/lib/core/queue.dart ('k') | sdk/lib/io/http_impl.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/core/set.dart
===================================================================
--- sdk/lib/core/set.dart (revision 14804)
+++ sdk/lib/core/set.dart (working copy)
@@ -110,14 +110,14 @@
}
void addAll(Collection<E> collection) {
- collection.forEach(void _(E value) {
+ collection.forEach((E value) {
add(value);
});
}
Set<E> intersection(Collection<E> collection) {
Set<E> result = new Set<E>();
- collection.forEach(void _(E value) {
+ collection.forEach((E value) {
if (contains(value)) result.add(value);
});
return result;
@@ -128,26 +128,26 @@
}
void removeAll(Collection<E> collection) {
- collection.forEach(void _(E value) {
+ collection.forEach((E value) {
remove(value);
});
}
bool containsAll(Collection<E> collection) {
- return collection.every(bool _(E value) {
+ return collection.every((E value) {
return contains(value);
});
}
void forEach(void f(E element)) {
- _backingMap.forEach(void _(E key, E value) {
+ _backingMap.forEach((E key, E value) {
f(key);
});
}
Set map(f(E element)) {
Set result = new Set();
- _backingMap.forEach(void _(E key, E value) {
+ _backingMap.forEach((E key, E value) {
result.add(f(key));
});
return result;
@@ -160,7 +160,7 @@
Set<E> filter(bool f(E element)) {
Set<E> result = new Set<E>();
- _backingMap.forEach(void _(E key, E value) {
+ _backingMap.forEach((E key, E value) {
if (f(key)) result.add(key);
});
return result;
« no previous file with comments | « sdk/lib/core/queue.dart ('k') | sdk/lib/io/http_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698