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

[WIP] [RFC] pastel add ability to partition by a list of indices #188

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bandersongit
Copy link
Contributor

Added the ability to partition by a list of indices. E.g. partitioning by [i1, i2, i3] will split a string into up to 4 substrings consisting of the ranges from (0 - i1), (i1 - i2) (i2 -i3), (i3 - endOfString).

What remains is
a) Naming the function (currently just partition2 as a placeholder)
b) Figuring out what preconditions we want to have on the indices (and how to handle nonsense input, the behavior for partitioning a single string can be found in the test cases for that function, but don't generalize super well)
b) Test some boundary conditions (slightly blocked by point b)

@bandersongit bandersongit requested a review from kyldvs July 16, 2019 01:02
@facebook-github-bot facebook-github-bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Jul 16, 2019
@facebook-github-bot
Copy link

Hi @bandersongit!

Thank you for your pull request. We require contributors to sign our Contributor License Agreement, and yours needs attention.

You currently have a record in our system, but we do not have a signature on file.

In order for us to review and merge your code, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

If you have received this in error or have any questions, please contact us at [email protected]. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Do not delete this pull request or issue due to inactivity.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants