3 ms·
Just like C++, your filter can be simplified like, filter(|string| {set.insert(string)} as insert return a bool.
by johannkokos 7y ago
Just like C++, your filter can be simplified like,
filter(|string| {set.insert(string)}
as insert return a bool.
- nicoburns 7y agoOo, I didn't realise that. Super handy. I've updated my snippet to make use of your suggestion :)