summaryrefslogtreecommitdiff
path: root/src/core/Iterating.cs
blob: 3e7de1477355aa0f84b5cb4324da165d206a3d97 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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);
        }
    }
}