pub fn capitalize_words_vector(words: &[&str]) -> Vec<String> {

    let closure = | x: &&str | -> String {
        capitalize_first(*x)
    };
    words.iter().map(closure).collect()
}
// Step 2.
// Apply the `capitalize_first` function to a slice of string slices.
// Return a vector of strings.
// ["hello", "world"] -> ["Hello", "World"]
Step 2.
Apply the `capitalize_first` function to a slice of string slices.
Return a vector of strings.
Step 2 . Apply the ` capitalize_first ` function to a slice of string slices . Return a vector of strings .
pub fn capitalize_words_vector(words: &[&str]) -> Vec<String> {
    let closure = | x: &&str | -> String {
        capitalize_first(*x)
    };
    words.iter().map(closure).collect()
}
pub fn capitalize_words_vector ( words : & [ & str ] ) -> Vec < String > { let closure = | x : & & str | -> String { capitalize_first ( * x ) } ; words . iter ( ) . map ( closure ) . collect ( ) }
Step 2.
Step 2 .
words
&[&str]