3 ms·
Shouldn't you be able to write that as `usersList.stream().forEach(someSet.add)` For Javascript at least that would work.
by irishsultan 8y ago
Shouldn't you be able to write that as `usersList.stream().forEach(someSet.add)`
For Javascript at least that would work.
- leshow 8y agoI haven't written Java since like java 5, but I believe java 8 has syntax for this as well: `usersList.stream().forEach(someSet::add)`