Function sknife::collection::zip
[−]
[src]
pub fn zip<T>(first_list: Vec<T>, second_list: Vec<T>) -> Vec<(T, T)>
Zips 2 list into a list of tuples
Arguments
first_list
- First listsecond_list
- Second list
Example
use sknife::collection::zip; let first_list = vec![Some(1), Some(2), Some(3)]; let second_list = vec![Some(1), Some(4), Some(9)]; zip(first_list, second_list);
Result
vec![(Some(1), Some(1)), (Some(2), Some(4)), (Some(3), Some(9))];