keep every nth element of an iterable starting with the first 1,2,3,4,5,6,7,8,9.takeEveryNth(3) -> 1,4,7
1,2,3,4,5,6,7,8,9
1,4,7
Iterable<T> takeEveryNth(int n) => whereIndexed((i, _) => i % n == 0);