SyntaxFix
Write A Post
Hire A Developer
Questions
I'm surprised nobody has mentioned reduce, which works well when you have an array of arrays:
reduce
lists = [["a", "b"], ["c", "d"]] flatlist = lists.reduce(:+) # ["a", "b", "c", "d"]