Group Admins

  • Profile picture of Karim
  • Profile picture of Jean


Public Group active 6 hours, 51 minutes ago

User group for OpenMusic and computer-aided composition. Visit the Forum for discussions.

Permutation of sublists

Author 2 Subscribed Users |
Profile photo of michalszostalo

Hi everyone,

I am wondering if there is an efficient way to apply permutations (or any other process, for that matter) to sublists. There is a patch in the FDSDB library that does this, but it only applies random permutation, whereas I’d like to control the type of permutation. I will say at the outset that I haven’t learned how to write lisp code yet, maybe it’s time that I do that, but in the meantime, if anyone has a suggestion how to do it visually I’ll be very grateful.

I’ve found one unsatisfactory workaround: flat the list of lists, apply the process, then -> group list.

May 30, 2018 at 17:54 #26625
Profile photo of Karim


No group-list is a bad idea. Use instead mapcar (or omloop for more complicated stuff)
cf. attachment


May 30, 2018 at 18:42 #26626
Profile photo of michalszostalo

Perfect, thanks very much!

May 30, 2018 at 19:09 #26629

You must be logged in to reply to this topic.

Log in now