zip implementation
range-based reduce algorithm