-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Closed
Labels
api-approvedAPI was approved in API review, it can be implementedAPI was approved in API review, it can be implementedarea-System.Linq
Milestone
Description
(By @agocke) Rewriting this issue to focus on exactly one API:
class System.Linq.Enumerable
{
public static IEnumerable<(T1, T2)> Zip<T1, T2>(this IEnumerable<T1> first, IEnumerable<T2> second)
{
return first.Zip(second, (x, y) => (x, y));
}
// Already EXISTS:
public static IEnumerable<TResult> Zip<TFirst, TSecond, TResult>(this IEnumerable<TFirst> first, IEnumerable<TSecond> second, Func<TFirst, TSecond, TResult> resultSelector);
}There will also be a matching IQueryable API:
class System.Linq.Queryable
{
public static IQueryable<(T1, T2)> Zip<T1, T2>(this IQueryable<T1 first, IQueryable<T2> second);
// Already EXISTS:
public static IQueryable<TResult> Zip<TFirst, TSecond, TResult>(this IQueryable<TFirst> source1, IEnumerable<TSecond> source2, Expression<Func<TFirst, TSecond, TResult>> resultSelector);
}[EDIT] Add class names and existing Zip method for context by @karelz
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
api-approvedAPI was approved in API review, it can be implementedAPI was approved in API review, it can be implementedarea-System.Linq