hosneyalaa Posted July 24, 2019 Posted July 24, 2019 Hello everyone If I have a list the following format (("HDHDHDH" "HDHDHDH" "HDHDHDH" "HDHDHDH") (1.0 "" 3.0 "S") (1.0 2.0 "" "S")) How can I convert it to the following format ("HDHDHDH" "HDHDHDH" "HDHDHDH" "HDHDHDH" 1.0 "" 3.0 "S" 1.0 2.0 "" "S") I mean removing the arc's from the list Thanks in advance Quote
Tharwat Posted July 24, 2019 Posted July 24, 2019 (apply 'append '(("HDHDHDH" "HDHDHDH" "HDHDHDH" "HDHDHDH") (1.0 "" 3.0 "S") (1.0 2.0 "" "S"))) 1 Quote
hosneyalaa Posted July 24, 2019 Author Posted July 24, 2019 My friend Tharwat Thank you very much Thanks for help Quote
Grrr Posted July 24, 2019 Posted July 24, 2019 FWIW (defun f ( L / x ) (if L (append (if (listp (setq x (car L))) (f x) (list x) ) (f (cdr L)) ) ) ) Quote
ronjonp Posted July 24, 2019 Posted July 24, 2019 5 hours ago, Grrr said: FWIW (defun f ( L / x ) (if L (append (if (listp (setq x (car L))) (f x) (list x) ) (f (cdr L)) ) ) ) You've become quite the recursion master Quote
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.
Note: Your post will require moderator approval before it will be visible.