
On Fri, Feb 27, 2009 at 8:07 PM, vicente.botet <vicente.botet@wanadoo.fr> wrote:
From: "Rogier van Dalen" <rogiervd@gmail.com>
I think something like zip() would be very useful, but for consistency should probably be spelled zipped(). zipped(rng1, rng2) | transformed (unpack(binary_fun()) seems more general for iterating through two ranges in parallel. zipped() would also alleviate the need for for_each over two ranges.
For consistency, why not
pack(rng1, rng2) | transformed (unpack(binary_fun())
Vicente
'zip' is a commonly used name for mapping a pair of ranges to ranges of pairs in other languages; I see no reason not to use it. Also, boost.iterator already has zip_iterator adapters. Another (arguably) good name might be transpose, but that is probably best left for ranges of ranges. BTW, unpack already exists in boost as fusion::fused. -- gpd