Consider this solution, though it is somewhat brittle (e.g. when keys do not align). Also, this modifies the 'first' list as a side-effect, which is a bit of a smell.
// modifies 'first' as a side-effect
def merge = { def first, def subSecond ->
def subFirst = first.find { it[0] == subSecond[0] }
if (subFirst) {
subFirst.addAll( subSecond[1..subSecond.size()-1] )
}
}
// tests
def first = null
def results = null
first = [["A",2,4,6],["B",1,3,5]]
results = []
results.each { def subSecond -> merge(first,subSecond) }
assert [["A",2,4,6],["B",1,3,5]] == first
first = [["A",2,4,6],["B",1,3,5]]
results = [ ["A",8,10,12] ]
results.each { def subSecond -> merge(first,subSecond) }
assert [["A",2,4,6,8,10,12],["B",1,3,5]] == first
first = [["A",2,4,6],["B",1,3,5]]
results = [ ["A",8,10,12],["B",7,9,11] ]
results.each { def subSecond -> merge(first,subSecond) }
assert [["A",2,4,6,8,10,12],["B",1,3,5,7,9,11]] == first