Creates a sink collecting all unique items into a set.
The type of items in the stream
A sink that collects all unique items into a set
await items([1, 2, 2, 3, 3, 3])(toSet()); // Set(3) { 1, 2, 3 }await items([1, 2, 3])(toSet()); // Set(3) { 1, 2, 3 } Copy
await items([1, 2, 2, 3, 3, 3])(toSet()); // Set(3) { 1, 2, 3 }await items([1, 2, 3])(toSet()); // Set(3) { 1, 2, 3 }
Creates a sink collecting all unique items into a set.