Given any list, group n number of sublists into a single list
Don Green <[email protected]>
| Newsgroups | gmane.comp.lang.racket.user,gmane.lisp.scheme.plt |
|---|---|
| Message-ID | <CANeurs+X9=fBq6vJh42JR0qaDEPe8NyAh5A9Y0CQwZOXancsFA@mail.gmail.com> |
Racket code that could perform this list manipulation? (every-n-lists-into-list <n-lists-to-group> '(<in-list>)) (every-n-lists-into-list 1 '((1) (2))) ;=> '(((1) (2))) (every-n-lists-into-list 2 '((1) (2) (3) (4))) ;=> '(((1) (2)) ((3) (4))) (every-n-lists-into-list 3 '((1) (2) (3) (4)) (5) (6))) ;=> '(((1) (2) (3)) ((4) (5) (6))) Thanks Don -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/[email protected] For more options, visit https://groups.google.com/d/optout.