Advertisement
Guest User

Untitled

a guest
Jun 30th, 2015
233
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.17 KB | None | 0 0
  1. const group = ( list, [ first, ...rest ] ) =>
  2. rest.reduce(
  3. ( grouped, key ) =>
  4. grouped.map( group =>
  5. _.partition( group, key )
  6. ),
  7. _.partition( list, first )
  8. )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement