Intermix arrays (using Ruby)
I haven’t posted in a while because GoLark is consuming all of my time, but tonight I felt compelled because of how cool this is. I needed to intermix two arrays, here is how I did it:
a1 = [1,2,3] a2 = ["a","b","c"] intermixed_array = [a1,a2].transpose.flatten
Yeah, no doubt. Is that obvious?
No Comments Yet