Kirby,
It's difficult to do this without knowing the pattern needed to generate list of sub-lists B.
The pattern is as follows.
ListofsublistsA
(REFNUM NUM1 NUM2)
SublistA1 ( 0 10 10 )
SublistA2 ( 1 5 2 )
SublistA3 ( 2 -8 -5 )
If the index is zero, return original number. if the reference number is a number greater than 0, add the corresponding sublist to the numbers.
SublistB1 (10 10)
SublistB2 (15 12) which is (5+10) and (2+10)
SublistB3 ( 7 7) which is (-8+15) and (-5+12)
The quantity of sublists inside of listofsublists is not set to any particular number.
The reference number in each sublist has a minimum number of 0 and a maximum number which is the total number of sublists inside of listofsublists.
The reference number can be repeated in multiple sublists in listsofsublists.
The reference number is technically an index number representing a sublist inside of listofsublists. (subtract 1 from the reference number, as lists start with 0 in LISP)
The addition/subtraction of sublists can be multi-nested as in my original post. It has a technical maximum nesting level of (quantity of sublists in listofsublists minus 1)
The Reference number of a sublist cannot refer to itself, unless it is 0.
There is no particular order for the reference number to appear. sublist2 could reference sublist10. (Sublist2 (10 -8 -4))
There is also the potential of all sublists inside of listofsublists to have a reference number of 0, requiring no addition/subtraction.
Thank you,
Matthew H.