I am trying to find the shortest method of creating pairs of values from two lists.

   def a = [ 1,2,3,4,5,6 ]
   def b = [ 'a','b','c' ]

   assert [ [ 1,'a'], [2,'a'], ... [5,'c'],[6,'c'] == f(a,b)

The question is what te shortest possible implementation f(a,b) looks like.

I know a.collect { item -> b.collect { [item,it] } } should work, but wondering if there is something better.

--
Schalk W. Cronjé
Twitter / Ello / Toeter : @ysb33r

Reply via email to