Check out: http://stackoverflow.com/questions/28753729/how-to-manually-flatten-a-list-in-racket-scheme Cheers, ~Mike
Sent from my Samsung Galaxy smartphone.-------- Original message --------From: Urs Liska <[email protected]> Date: 28/11/2015 10:24 AM (GMT+02:00) To: lilypond-user <[email protected]> Subject: unpacking a list Hi all, I don't seem to find a way to "unpack" a list. I think I won't explain the background, but basically what I need is that (list (list 1 2 3) 4) becomes (list 1 2 3 4) This is a mock-up of my real code: #(define (func-a) (list 1 2 3)) #(define (func-b) (list (func-a) 4)) #(display (func-b)) What I need is that the call to (func-a) doesn't evaluate to a list but to its elements. I have "solved" it by actually using something like (append (func-a) (list f4)) but I think that's not really clean. I'd prefer directly "unpacking" the list in situ. Any suggestions? TIA Urs _______________________________________________ lilypond-user mailing list [email protected] https://lists.gnu.org/mailman/listinfo/lilypond-user
_______________________________________________ lilypond-user mailing list [email protected] https://lists.gnu.org/mailman/listinfo/lilypond-user
