effect icon indicating copy to clipboard operation
effect copied to clipboard

From Discord: Questions about SortedSet.fromIterable deduplication behavior

Open effect-bot opened this issue 8 months ago • 1 comments

Summary

The conversation revolves around the behavior of the SortedSet.fromIterable method in the Effect-TS ecosystem. The users are discussing whether this method should deduplicate items.

Key takeaways:

  1. Observation: One user noticed that SortedSet.fromIterable does not deduplicate items.
  2. Clarification: Another user initially couldn't find evidence that SortedSet deduplicates entries and suggested it might be a misunderstanding.
  3. Conclusion: The same user later suggested that it might be a bug or a wrong assumption about the input being a Set.
  4. Workaround: As a temporary solution, the user recommended converting the array to a Set first and then using SortedSet.fromIterable with the appropriate ordering (ord).

In summary, there is some confusion and debate about whether SortedSet.fromIterable should deduplicate items, with a suggested workaround to ensure deduplication.

Discord thread

https://discord.com/channels/795981131316985866/1246813877941829694

effect-bot avatar Jun 02 '24 13:06 effect-bot