Follow-up question based on What is the being called here: return _().
What is the point of declaring the local function below?
return _(); IEnumerable<TResult> _()
{
var bucket = new TSource[collection.Count];
collection.CopyTo(bucket, 0);
yield return resultSelector(bucket);
}
Why not just replace the call with the function body?
var bucket = new TSource[collection.Count];
collection.CopyTo(bucket, 0);
yield return resultSelector(bucket);