3 ms·
> So I used Data.Seq, but, there is no pop() function Perhaps "viewl :: Seq a -> ViewL" a could be used as pop. > I wanted to put list or set into a hash tab
by danidiaz 10y ago
> So I used Data.Seq, but, there is no pop() function
Perhaps "viewl :: Seq a -> ViewL" a could be used as pop.
> I wanted to put list or set into a hash table, but unfortunately, these are not defined as instances of Data.Hashable.
Are you using the "hashable" package? There does seem to be an instance for lists (when the elements of the list are themselves hashable):
> Hashable a => Hashable [a]
- js8 10y agoI am not even sure from the documentation what the ViewL abstraction is supposed to be good for. OK, I stand corrected on Hashable, apparently what I said is not true for neither lists or sets.