This language bar is your friend. Select your favorite languages!
Edit summary for version 5 :
New Ruby implementation by user [steenslag]

Version 4

Version 5

Idiom #143 Iterate alternatively over two lists

Iterate alternatively over the elements of the list items1 and items2. For each iteration, print the element.

Idiom #143 Iterate alternatively over two lists

Iterate alternatively over the elements of the list items1 and items2. For each iteration, print the element.

Extra Keywords
parallel
Extra Keywords
parallel
Code
[items1, items2].transpose.each{|ar| ar.each{|item| p item }}