diff options
author | 2011-02-17 18:59:33 +0000 | |
---|---|---|
committer | 2011-02-17 18:59:33 +0000 | |
commit | d1467b27944cc71bdf1c2b6350ab7d60933fedb3 (patch) | |
tree | 89959d95a9752857822f7ceea57ca0b144850b7b /Source/Core/Util.cs | |
parent | abbb2256f7b44bb918c2b607d785a333d282401f (diff) |
Add IEnumerable.Iter
Diffstat (limited to 'Source/Core/Util.cs')
-rw-r--r-- | Source/Core/Util.cs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Source/Core/Util.cs b/Source/Core/Util.cs index 6ed01e7f..d0d8693a 100644 --- a/Source/Core/Util.cs +++ b/Source/Core/Util.cs @@ -48,6 +48,11 @@ namespace Microsoft.Boogie { l.RemoveRange(l.Count - count, count);
return l;
}
+
+ public static void Iter<T>(this IEnumerable<T> coll, Action<T> fn)
+ {
+ foreach (var e in coll) fn(e);
+ }
}
public class TokenTextWriter : IDisposable {
|