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

List.chunksOf drops remaining elements #236

Open
pbiggar opened this issue Dec 25, 2021 · 2 comments
Open

List.chunksOf drops remaining elements #236

pbiggar opened this issue Dec 25, 2021 · 2 comments

Comments

@pbiggar
Copy link
Member

pbiggar commented Dec 25, 2021

The current docs for List.chunksOf say that "If there aren't enough elements to make the last 'chunk', those elements are ignored."

This is a bad thing, and led me to have issues in production.

@pbiggar
Copy link
Member Author

pbiggar commented Dec 25, 2021

Also look into List.sliding

@Lomand
Copy link
Contributor

Lomand commented Dec 25, 2021

Similar functions in Ramda and Lodash do not guarantee that the final chunk will have the same length as the other elements. I guess this should be the default behavior for the Tablecloth as well, and the current behavior should be renamed to chunksOfStrict or something like that.

@pbiggar pbiggar added this to the 0.2.0 milestone Oct 11, 2022
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