Changeset 14400 for trunk/sources/HeuristicLab.Common
- Timestamp:
- 11/17/16 15:41:33 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Common/3.3/EnumerableExtensions.cs
r14393 r14400 133 133 } 134 134 } 135 public static IEnumerable<T> TakeEvery<T>(this IEnumerable<T> xs, int nth) {136 int i = 0;137 foreach (var x in xs) {138 if (i % nth == 0) yield return x;139 i++;140 }141 }142 135 143 136 /// <summary>
Note: See TracChangeset
for help on using the changeset viewer.