effect
effect copied to clipboard
From Discord: Questions about SortedSet.fromIterable deduplication behavior
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:
-
Observation: One user noticed that
SortedSet.fromIterable
does not deduplicate items. -
Clarification: Another user initially couldn't find evidence that
SortedSet
deduplicates entries and suggested it might be a misunderstanding. -
Conclusion: The same user later suggested that it might be a bug or a wrong assumption about the input being a
Set
. -
Workaround: As a temporary solution, the user recommended converting the array to a
Set
first and then usingSortedSet.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