Closed joeljfischer closed 3 years ago
Hi Joel, the filter(_:)
method comes from the Sequence
protocol OrderedDictionary
conforms to. It’s, indeed, a good idea to have a specialized filter(_:)
method which returns an OrderedDictionary
. If you have an implementation to share, feel free to open a pull request.
Thanks again for reporting this feature request. In version 4.0, which is about to be released soon, your desired functionality for filter(_:)
is already available. Check it out on the branch v4.0
(#69) or wait a few days till the version is officially released.
When calling
filter
on an unorderedDictionary
, you receive a newDictionary
, but oddly, when callingfilter
on anOrderedDictionary
, you receive an array of tuples. I think it would be better to receive a newOrderedDictionary
instead. It would also be good to have a newfiltered
method as well that filters in place.