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

Splitting functions should return non-empty list #101

Open
tomjaguarpaw opened this issue Nov 21, 2021 · 1 comment
Open

Splitting functions should return non-empty list #101

tomjaguarpaw opened this issue Nov 21, 2021 · 1 comment

Comments

@tomjaguarpaw
Copy link
Owner

A property of splitting should be that the output list contains n + 1 elements where there were n boundaries in the input. Therefore the output list should have length at least 1.

The functions in Data.List need this treatment, for example

https://hackage.haskell.org/package/text-1.2.3.1/docs/Data-Text.html#v:splitOn

@kindaro
Copy link

kindaro commented Dec 1, 2021

Another function that needs this is the one that gives all permutations. See also this issue to Relude.

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

No branches or pull requests

2 participants