Posted March 11, 20214 yr Dear Friends, I have this recurrent problem with lists... Please, help... ;;; I have this TWO lists (setf list1 '(v1rp0 v1rp1 v1rp2 v1rp3 v1rp4) (setf list2 '(melch1-0 melch1-1 melch1-2 melch1-3 melch1-4) ;;;AND ;;; I need a list like this (alternating the list) (v1rp0 melch1-0 v1rp1 melch1-1 v1rp2 melch1-2 v1rp3 melch1-3 v1rp4 melch1-4) How can I proceed ? Thanks a lot Best, Julio (a desperate quarantine composer) OBS. help in combining THREE lists are also greatly appreciated, as well as how to combine parts of the lists. Thank you... my brain is ruined for now (I´m doing something BIG... ) All the best ! Julio
March 11, 20214 yr (setf list1 '(v1rp0 v1rp1 v1rp2 v1rp3 v1rp4)) (setf list2 '(melch1-0 melch1-1 melch1-2 melch1-3 melch1-4)) (matrix-transpose (list list1 list2)) => ((v1rp0 melch1-0) (v1rp1 melch1-1) (v1rp2 melch1-2) (v1rp3 melch1-3) (v1rp4 melch1-4)) or (setf mat1 '((c4 db4) (ab4 f4) (g4 bb4) (a4 eb4) (b4 e4) (d4 gb4))) (setf mat2 '((db4 ab4) (f4 g4) (bb4 a4) (eb4 b4) (e4 d4) (gb4 c4))) (gen-mix mat1 mat2) => ((c4 db4) (db4 ab4) (ab4 f4) (f4 g4) (g4 bb4) (bb4 a4) (a4 eb4) (eb4 b4) (b4 e4) (e4 d4) (d4 gb4) (gb4 c4))
Create an account or sign in to comment