How to merge two list into one list in scala -


i have 2 type of list contain follow.

list(50, 50, 50, 50, 50, 51, 51, 51) 

and

list(176482, 176481, 176485, 176479, 176478, 176477, 176483, 176480) 

by using these 2 list want create new list should contain follow

list(50176482, 50176481, 50176485, 50176479, 50176478, 51176477, 51176483, 51176480) 

can 1 on this?

scala> (list(50, 50, 50, 50, 50, 51, 51, 51) zip list(176482, 176481, 176485, 176479, 176478, 176477, 176483, 176480)).map(x => (x._1.tostring + x._2.tostring).toint) res0: list[int] = list(50176482, 50176481, 50176485, 50176479, 50176478, 51176477, 51176483, 51176480) 

Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -