flux icon indicating copy to clipboard operation
flux copied to clipboard

Add zip_map adaptor

Open tcbrindle opened this issue 1 year ago • 0 comments

The element type of flux::cartesian_product, cartesian_power and adjacent is a tuple of the element type(s) of the underlying sequences. These three adaptors also provide *_map versions, which take an n-ary function and call it directly with the underlying elements. This is to avoid forming a tuple and then immediately destructuring it, as would happen in a subsequent call to map(unpack(func)).

The odd one out is zip, which doesn't provide a _map form. We should fix that.

tcbrindle avatar Feb 14 '24 18:02 tcbrindle