public static R2 FoldR <L, R, R2>(this Either <L, R> @this, R2 identity, Func <R2, R, R2> fn) { var accumulator = identity; foreach (R element in @this.AsEnumerable()) { accumulator = fn(accumulator, element); } return(accumulator); }
public static void ForEach <L, R>(this Either <L, R> @this, Action <R> f) => @this.AsEnumerable().ForEach(f);