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
We've got ISet and ==>>, which are pretty cool, but require an Ord constraint on the key type. Theoretically you can define an ordering for any ADT by considering it a glorified pair of (branch index, values), and use the product ordering. However, given an A => Long hash function, we could implement a hash-trie-based persistent map, such as unordered-containers's.
This could be as simple as closing over an A => Long function, or creating a Hashable typeclass. If we want to go further, having a hash function that accepts a hashing algorithm would allow for potentially more applications of varying strength, although at that point it may be large enough to be considered its own project.
We've got
ISet
and==>>
, which are pretty cool, but require anOrd
constraint on the key type. Theoretically you can define an ordering for any ADT by considering it a glorified pair of(branch index, values)
, and use the product ordering. However, given anA => Long
hash function, we could implement a hash-trie-based persistent map, such asunordered-containers
's.This could be as simple as closing over an
A => Long
function, or creating aHashable
typeclass. If we want to go further, having a hash function that accepts a hashing algorithm would allow for potentially more applications of varying strength, although at that point it may be large enough to be considered its own project.cc @Milyardo @JasnaMRB with whom I chatted last week
The text was updated successfully, but these errors were encountered: