Logo

Programming-Idioms

History of Idiom 141 > diff from v5 to v6

Edit summary for version 6 by programming-idioms.org:
New Go implementation by user [programming-idioms.org]

Version 5

2016-08-25, 21:40:51

Version 6

2016-08-26, 14:31:25

Idiom #141 Iterate in sequence over two lists

Iterate in sequence over the elements of the list items1 then items2. For each iteration print the element.

Idiom #141 Iterate in sequence over two lists

Iterate in sequence over the elements of the list items1 then items2. For each iteration print the element.

Code
for _, v := range items1 {
	fmt.Println(v)
}
for _, v := range items2 {
	fmt.Println(v)
}
Comments bubble
No magic sugar. Write 2 loops.
Demo URL
https://play.golang.org/p/kTCzFtVUdo