Hi! It's the second example of String's method
retain. I have trouble understanding expression in the closure passed to it. Can you explain it to me? Thanks in advance!
let mut s = String::from("abcde"); let keep = [false, true, true, false, true]; let mut i = 0; s.retain(|_| (keep[i], i += 1).0); assert_eq!(s, "bce");
P.S. Playground link