summaryrefslogtreecommitdiff
path: root/src/core/Iterating.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/Iterating.cs')
-rwxr-xr-xsrc/core/Iterating.cs14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/core/Iterating.cs b/src/core/Iterating.cs
new file mode 100755
index 0000000..3e7de14
--- /dev/null
+++ b/src/core/Iterating.cs
@@ -0,0 +1,14 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+
+namespace core
+{
+ public static class Iterating
+ {
+ public static void Each<T>(this IEnumerable<T> items, Action<T> visitor)
+ {
+ foreach (var item in items ?? Enumerable.Empty<T>()) visitor(item);
+ }
+ }
+} \ No newline at end of file