I find a lot of reference about removing duplicates in ruby but I cannot find how to create duplicate.
If I have an array like [1,2,3] how can I map it to a
[1,2,3]
Try this:
[1, 2, 3] * 2 => [1, 2, 3, 1, 2, 3]
You might want it sorted:
([1, 2, 3] * 2).sort => [1, 1, 2, 2, 3, 3]