I do this for fun. Itās like at school when we do math and calculating the result one step at a time.

**In bold is the next step.**

*In italic is the result*

let data = [3, 8, 5];

let pad = [6, 7];

**data**.iter().zip(**pad**.iter().cycle()).map(|(&a, &b)| a ^ b).collect()

*[3 , 8, 5]*.iter().zip(*[6, 7]*.iter().cycle()).map(|&a, &b| a ^ b).collect()

[3 , 8, 5].iter().zip(**[6, 7].iter().cycle()**).map(|&a, &b| a ^ b).collect()

[3, 8, 5].iter().zip(*[6, 7, 6, 7, 6, 7, 6, 7, ā¦]*).map(|&a, &b| a ^ b).collect()

**[3, 8, 5].iter().zip([6, 7, 6, 7, 6, 7, 6, 7, ā¦])**.map(|&a, &b| a ^ b).collect()

*[[3, 6], [8, 7], [5, 6]]*.map(|&a, &b| a ^ b).collect()

**[[3, 6], [8, 7], [5, 6]].map(|&a, &b| a ^ b)**.collect()

*[[3 ^ 6], [8 ^ 7], [5 ^ 6]]*.collect()

[**[3 ^ 6]**, **[8 ^ 7]**, **[5 ^ 6]**].collect()

[*5*, *15*, *3*].collect()

**[5, 15, 3].collect()**

*[5, 15, 3]*