[CM] query on references within Loop

Adam ahcnz@ihug.co.nz
Tue, 15 Aug 2006 16:31:11 +1200


This has me a little puzzled, in Common Music, 

The intention is that Loop cycles through a list, and for each entry then 
collects a list carried in that item. 

However an error reports that ..  a-ref  is not of type list.  While it 
appears to be a list, perhaps its outside of the Loop scope somehow ? 

Can anyone suggest where I am going wrong here ?

(define a-ref '('a1  (1 2 3)  'a2))
(define b-ref '('b1  (4 5 6)  'b2))
(define c-ref '('c1  (7 8 9)  'c2))

(define ref-list '(a-ref b-ref c-ref))

(loop for refx in ref-list
      collect 
      (loop for data in (second refx)
	    collect data))