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
* Add 'fromListWithKey' to HashMap
Summary:
Test Plan:
Reviewers:
Subscribers:
Tasks:
Tags:
* Define `unsafeInsertWith` using `unsafeInsertWithKey`
See #246 (comment)
for performance numbers.
* Improve documentation of fromListWithKey
Thanks to @emilypi for the suggestions
* Add a test for fromListWithKey
It models the test for fromListWith but makes
sure that values are combined in a way that depends
on the key.
* Clarify the documentation for fromListWithKey
* Improve properties for fromListWith and fromListWithKey
The old properties used associative operators to combine
values when there were duplicate keys.
With this diff we're using a non-commutative and
non-associative operator which can catch more bugs.
* Make sure to return an unboxed tuple in unsafeFromListWithKey
This got lost in a rebase
* Use the free magma to ensure that we preserve the order of operations
* Update fromListWithKey documentation to use non-commutative, non-associative operators
Since the combining function is applied in a way that can be
counter-intuitive it's more pedagical to to use operators which
better illustrate this behaviour.
0 commit comments