Returns a shallow copy of the specified array flattened to 1-dimension.
@array - the array to flatten.
A shallow copy of the specified array flattened to 1-dimension.
@array = @("a", "b", "c", @("dd", "ee", "ff", @("ggg", "hhh"), "ii"), "j", "k"); @copy = flatten(@array); println(@copy);
@('a', 'b', 'c', 'dd', 'ee', 'ff', 'ggg', 'hhh', 'ii', 'j', 'k')