Rubies:
Here's a ragged array:
[ [ 1 ],
[ 2, 3 ],
[ 4 ],
[ 5, 6 ],
[ 7 ],
[ 8 ] ]
How, with the tightest, or most modern, or coolest statements, can we turn it
into this?
[ [ 1, 1 ],
[ 2, 3 ],
[ 4, 4 ],
[ 5, 6 ],
[ 7, 7 ],
[ 8, 8 ] ]
--
Phlip
http://www.zeroplayer.com/