public static IEnumerable <Indexed <T> > ToIndexed <T>(this IEnumerable <T> source) { int index = 0; foreach (T t in source) { yield return(Indexed.Create(index, t)); index++; } }
public Indexed <U> Select <U>(Func <T, U> selector) { return(Indexed.Create(Index, selector(Value))); }