The Uri type was missing implementations for several of the methods
that are part of the protocols and interfaces that Uri declares as
implementing. The missing functions are:
count from IPersistentCollection
empty from IPersistentCollection
cons from IPersistentCollection (used by conj)
without from IPersistentMap (used by dissoc)
iterator from Iterable which IPersistentMap implies (used by reduce)
There was also a problem with the implementation for entryAt which was
not returning the expected IMapEntry type causing a runtime error when
it was called (which find does).
All these problems are now fixed and tested with unit tests.
Lastly I have also made Uri implement java.util.Map as defrecord also does that and it improves interop with Java.
The
Uri
type was missing implementations for several of the methods that are part of the protocols and interfaces thatUri
declares as implementing. The missing functions are:count
fromIPersistentCollection
empty
fromIPersistentCollection
cons
fromIPersistentCollection
(used byconj
)without
fromIPersistentMap
(used bydissoc
)iterator
fromIterable
whichIPersistentMap
implies (used byreduce
)There was also a problem with the implementation for
entryAt
which was not returning the expectedIMapEntry
type causing a runtime error when it was called (whichfind
does).All these problems are now fixed and tested with unit tests.
Lastly I have also made
Uri
implementjava.util.Map
asdefrecord
also does that and it improves interop with Java.