• Profile picture of Karim
  • Profile picture of Jean


Groupe Public active 2 days et 12 hours ago

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

Permutation of sublists

Auteur 2 Utilisateurs souscrits |
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.

Mai 30, 2018 à 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


Mai 30, 2018 à 18:42 #26626
Profile photo of michalszostalo

Perfect, thanks very much!

Mai 30, 2018 à 19:09 #26629

Vous devez être connecté pour répondre à ce sujet.

Log in now