Fixed toPersistentSet, toPersistentMap to work with any impl.#108
Fixed toPersistentSet, toPersistentMap to work with any impl.#108comahe-de wants to merge 1 commit into
toPersistentSet, toPersistentMap to work with any impl.#108Conversation
`toPersistentSet` and `toPersistentMap` now working in a similar way as `toPersistentList` The contract in the KDoc was not fulfilled as it says for `toPersistentSet`: > If the receiver is already a persistent set, > returns it as is. > If the receiver is a persistent set builder, > calls `build` on it and returns the result. But the previous implementation just checked for `PersistentOrderedSet`, other implementations of `PersistentSet` where not considered Similar problem war fixed for `toPersistentMap`
|
Can you please share your use case and why working with any implementation is a better behavior? |
|
@qurbonzoda I have some custom implementations of Regarding |
toPersistentSetandtoPersistentMapnow working in a similar way astoPersistentListThe contract in the KDoc was not fulfilled as it says for
toPersistentSet:But the previous implementation just checked for
PersistentOrderedSet, other implementationsof
PersistentSetwhere not consideredSimilar problem war fixed for
toPersistentMap