Skip to content

Conversation

@johnynek
Copy link
Contributor

This adds two methods to HashMap:

  1. transform which matches the standard library function on Maps.
  2. unorderedTransformA which is the applicative generalization of transform appropriate for an unordered collection (requiring a CommutativeApplicative).

Then we can use unorderedTransformA to implement unorderedTraverse which does strictly less work since these two new methods never rehash and reconstruct the trie, it just reuses the exact same structure as the original trie.

Copy link
Collaborator

@gemelen gemelen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
(note that at the moment I'm not in a capacity to grasp everything behind the changeset)

@johnynek johnynek merged commit e4b8684 into master Dec 23, 2025
29 checks passed
@gemelen gemelen deleted the oscar/20251218-hashmap_transform branch December 24, 2025 03:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants