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

Add a function to group an array into fixed length sub-arrays. #998

Closed
euoia opened this issue Mar 5, 2013 · 2 comments
Closed

Add a function to group an array into fixed length sub-arrays. #998

euoia opened this issue Mar 5, 2013 · 2 comments

Comments

@euoia
Copy link

euoia commented Mar 5, 2013

For example:

> var arr = [1,2,3,4,5];
undefined
> _.grouped(arr, 3);
[ [ 1, 2, 3 ],
  [ 4, 5 ] ]
@michaelficarra
Copy link
Collaborator

Duplicate of #696.

@euoia
Copy link
Author

euoia commented Mar 6, 2013

Thanks for that. I learned that I can mix it in if I want. But I'm still not really clear why the original PR wasn't accepted - this seems like useful functionality that exists in other languages.

@megawac megawac mentioned this issue Jul 28, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants