Stream.resource/3 required for collecting sets.