Function alternating

Source
pub fn alternating(words: &[&str]) -> Vec<String>
Expand description

Makes each letter of each word alternate between lowercase and uppercase.

It alternates across words, which means the last letter of one word and the first letter of the next will not be the same letter casing.

assert_eq!(
    vec!["cAsE", "cOnVeRsIoN", "lIbRaRy"],
    pattern::alternating(&["Case", "CONVERSION", "library"])
);
assert_eq!(
    vec!["aNoThEr", "ExAmPlE"],
    pattern::alternating(&["Another", "Example"]),
);