Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support split(0) and split(size) #26

Closed
jcornaz opened this issue Jun 15, 2018 · 6 comments
Closed

Support split(0) and split(size) #26

jcornaz opened this issue Jun 15, 2018 · 6 comments
Labels

Comments

@jcornaz
Copy link

jcornaz commented Jun 15, 2018

Hello,

First, thank you very much for providing theses highly performant persistent datastructures.

However, I noticed that RrbTree does not support split at index 0 or equals to the size of the tree. And I don't really understand why.

If the index is zero then the split is easy:

  • left part: empty tree
  • right part: original tree

And if the index equals the size of the tree, then the split is easy again:

  • left part: original tree
  • right part: empty tree
@GlenKPeterson
Copy link
Owner

Thank you for reporting this. I've looked at it and you're right, that's how it should behave. Do you want me to fix it, or do you want to submit a patch? If a patch, please keep the changes minimal (don't let your IDE reformat whole files), try to match the code style, and update the unit tests.

@GlenKPeterson
Copy link
Owner

Never mind, I fixed it. Thank you very much! I put your name and a link to your project in the ChangeLog.

@GlenKPeterson
Copy link
Owner

P.S. I see you're a Kotlin fan. I have been doing a fair amount of work on a Kotlin rewrite. I was waiting for the JvmDefault annotation, then the JvmStatic annotation to work in interfaces, but I think in the version of Kotlin released yesterday it has experimental support, so I might be out of excuses. :-) Maybe in a month or so I'll have another check-in for the Kotlin branch. Thanks for your interest!

@jcornaz
Copy link
Author

jcornaz commented Jun 15, 2018

Thanks for the fix.

Yes I'm a big Kotlin fan, and I'm very pleased to see that you're working on improving this library for Kotlin devs.

Thanks to you for your work on this library.

@jcornaz
Copy link
Author

jcornaz commented Jun 15, 2018

@GlenKPeterson, it seems that you made a mistake in the git tag.

You tagged the fix 3.0.18 while it is actually the artifact 3.0.19.

@GlenKPeterson
Copy link
Owner

Oops! Thanks, I made a new 3.0.19 release. https://github.com/GlenKPeterson/Paguro/releases/tag/3.0.19

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2 participants