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

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

Issue 12646005: Add Set.union, Set.difference. Change Set methods to expect Set. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 9 months 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
Index: sdk/lib/core/iterable.dart
diff --git a/sdk/lib/core/iterable.dart b/sdk/lib/core/iterable.dart
index 8b276c076080bd7e208c3e8de1f21ea7ab287ec3..1fbbeee8b5d890edb2aa6bf0c501c2b53ff1c946 100644
--- a/sdk/lib/core/iterable.dart
+++ b/sdk/lib/core/iterable.dart
@@ -15,6 +15,11 @@ part of dart.core;
*
* A user-defined class that implements the [Iterable] interface can
* be used as the right-hand side of a for-in construct.
+ *
+ * Iterating over an iterable should not have side effects.
+ * If someone receives an iterable, they should be free to iterate it more
+ * than once (for example once to get the length, and then once to do something
floitsch 2013/03/12 16:25:00 Doesn't fit this CL. Also I don't necessarily agre
Lasse Reichstein Nielsen 2013/03/13 13:01:42 Removed for now.
+ * for each element).
*/
abstract class Iterable<E> {
const Iterable();

Powered by Google App Engine
This is Rietveld 408576698