joined(by:)
Returns the concatenation of the elements in this collection of collections, inserting the given separator between each collection.
func joined<Separator>(by separator: Separator) -> JoinedByCollection<Self, Separator> where Separator : Collection, Separator.Element == Self.Element.Element
for x in [[1, 2], [3, 4], [5, 6]].joined(by: [100, 200]) {
print(x)
}
// 1, 2, 100, 200, 3, 4, 100, 200, 5, 6