Chromium Code Reviews| Index: corelib/src/collection.dart |
| =================================================================== |
| --- corelib/src/collection.dart (revision 2973) |
| +++ corelib/src/collection.dart (working copy) |
| @@ -13,6 +13,16 @@ |
| void forEach(void f(E element)); |
| /** |
| + * Returns a new collection with the elements [: f(e) :] |
| + * for each element [e] of this collection. |
| + * |
| + * Note on typing: the return type of f() could be an arbitrary |
| + * type R and consequently the returned collection's |
| + * type would be Collection<R>. |
|
ahe
2012/01/05 22:36:54
This comment is confusing. The static type may con
Ivan Posva
2012/01/05 22:47:03
I don't think this comment is entirely correct. Th
|
| + */ |
| + Collection map(f(E element)); |
| + |
| + /** |
| * Returns a new collection with the elements of this collection |
| * that satisfy the predicate [f]. |
| * |
| @@ -21,6 +31,7 @@ |
| */ |
| Collection<E> filter(bool f(E element)); |
|
ahe
2012/01/05 22:36:54
Extra line.
|
| + |
| /** |
| * Returns true if every elements of this collection satisify the |
| * predicate [f]. Returns false otherwise. |