Lets have a look at merge() function. 
It takes a number of list and combines them to create a new list. Takes an element sequentially from each list and append it to the major list.
Below are some of the examples.
Source
It takes a number of list and combines them to create a new list. Takes an element sequentially from each list and append it to the major list.
Below are some of the examples.
merge({10, 50}, {60, 40})
Value  10; 60; 50; 40
merge({10, 30}, {20, 40, 50})
Value  10; 20; 30; 40; ; 50
merge({10, 30}, {20, 40, 50}, {60})
Value  10; 20; 60; 30; 40; ; ; 50;   #After the last semicolon one elelent exist 
merge({10, 30}, {20, 40, 50}, {60,70,80})
Value  10; 20; 60; 30; 40; 70; ; 50; 80
merge({1, 2, 3}, {4, 5, 6}) returns 1, 4, 2, 5, 3, 6
Source
Comments
Post a Comment