MoreLINQ icon indicating copy to clipboard operation
MoreLINQ copied to clipboard

Add EquiInterleave

Open Orace opened this issue 6 years ago • 2 comments

This PR addresses #695

Orace avatar Nov 14 '19 10:11 Orace

Out of curiosity, what does this add compared to the existing Interleave operation, other than an exception with imbalanced sequences?

Wouldn't it be more elegant to make the second Interleave overload that accepts a ImbalancedInterleaveStrategy argument public, and add a "Throw" strategy to that enumeration? Or at least use it internally, since the enumeration logic should be identical?

Crossbow78 avatar Dec 05 '19 21:12 Crossbow78

Out of curiosity, what does this add compared to the existing Interleave operation, other than an exception with imbalanced sequences?

Wouldn't it be more elegant to make the second Interleave overload that accepts a ImbalancedInterleaveStrategy argument public, and add a "Throw" strategy to that enumeration? Or at least use it internally, since the enumeration logic should be identical?

The "strategies as parameter" pattern has been discussed for the zip methods. (I will try to find the reference later). Turns out that "strategies as overload" pattern has been chosen for the zip methods : ZipShortest, ZipLongest and EquiZip. I just kept this pattern here.

We can just add an overload that call the private parametrized method, but it turns out that the current "parametrizable" implementation has issue #694.

I prefer to split it. Like it's done here #715 for zip.

Orace avatar Dec 05 '19 21:12 Orace

Closing as #695 was closed as unplanned for now.

atifaziz avatar Jan 20 '23 23:01 atifaziz