kowainik / treap

:leaves: :deciduous_tree: :fallen_leaf: Efficient implementation of the implicit treap data structure
Mozilla Public License 2.0
63 stars 1 forks source link

Add lawful `Semigroup` and `Monoid` instances to `Treap` and `RTreap` #25

Closed chshersh closed 5 years ago

chshersh commented 5 years ago

I think merge can be an implementation of <>.

sphaso commented 5 years ago

@chshersh do you mind if I take this?

chshersh commented 5 years ago

@sphaso Sure, go for it! It would be also nice to implement property-based testing for Semigroup and Monoid laws. But we have separate issue for that: #24. Let me know if you want to implement these two property-tests as well 🙂

sphaso commented 5 years ago

@chshersh great idea! I opened a PR which includes a couple of property-based tests.