You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! I would like to work on this.
However, I am not sure how should I do on Functor and Foldable parts. Also, it seems that values function cannot be implemented directly as a wrapper, since there is no function returning the keys of a map. Does I need to add another function such like keys for IntMap?
Hello, @arbuztw ! Please, take my apologies for not answering fast. I really happy that you're interested in contributing to this project :)
However, I am not sure how should I do on Functor and Foldable parts
Haskell version of IntSet doesn't have Functor and Foldable instances. And you can't implement these instances for IntSet so just don't do it :)
Does I need to add another function such like keys for IntMap?
As you correctly said, there's no keys functions for IntMap because it's not so trivial to implement. Thus you also shouldn't implement this function for IntSet.
arbuztw
added a commit
to arbuztw/idris-patricia
that referenced
this issue
Oct 27, 2017
Currently there's only
IntMap
data structure. But it would be good to haveIntSet
as well.This can be implemented easily by creating simple wrapper around
IntMap
like it's done here for AVL tree:https://github.com/jfdm/idris-containers/blob/master/Data/AVL/Set.idr
All functions for
IntMap
should be duplicated:size
member
insert
delete
If some functions from #5 will be implemented earlier than
IntSet
then those functions should be duplicated as well if possible.The text was updated successfully, but these errors were encountered: