JulioHerrlein Posted March 11, 2021 Share Posted March 11, 2021 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 Quote Link to comment Share on other sites More sharing options...
opmo Posted March 11, 2021 Share Posted March 11, 2021 (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)) JulioHerrlein 1 Quote Link to comment Share on other sites More sharing options...
JulioHerrlein Posted March 11, 2021 Author Share Posted March 11, 2021 You saved me from the bullets lviklund and opmo 2 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.