Rust - Functional
rust\nuse std::collections::HashSet;\n\nfn clean_email(email: String) -> String {\n    let v: Vec<&str> = email.split(\'@\').collect();\n    \n    let left = v[
```rust\nuse std::collections::HashSet;\n\nfn clean_email(email: String) -> String {\n    let v: Vec<&str> = email.split(\'@\').collect();\n    \n    let left = v[0]\n        .chars()\n        .take_while(|&c| c != \'+\')\n        .filter(|&c| c != \'.\')\n        .collect::<String>();\n    [&left, v[1]].join("@")\n}\n\nimpl Solution {\n    pub fn num_unique_emails(emails: Vec<String>) -> i32 {\n        emails\n            .into_iter()\n            .map(clean_email)\n            .collect::<HashSet<_>>()\n            .len() as i32\n    }\n}\n```
['Rust']