Logo

Programming-Idioms

History of Idiom 143 > diff from v4 to v5

Edit summary for version 5 by steenslag:
New Ruby implementation by user [steenslag]

Version 4

2016-08-14, 21:10:45

Version 5

2016-08-25, 22:26:30

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 }}