I have a data set that looks like this:
lis = {a,{{b,c},{d,e}},m,{p,q}}
Each single element of the list ("a" and "m" in this example) is followed by one or more sublists consisting of two elements ("{b,c}", "{d,e}" and "{p,q}" in this example). I would like to tag each sublist pair with its preceding single element, turning the list into:
lis2 = {{b,c,a},{d,e,a},{p,q,m}}
I would be interested in an efficient way of doing this, and thank you in advance for any ideas.