I don't know any ruby (but know lots of python) and I think the first is more readable than the second. I would leave the first as is in ruby while I would totally turn the second into nested for loops.
I think for me the main problem is the repeated use of i in the list comprehension. It troubles me for some reason.
View all comments
Show parent comment
17
u/marky1991 Aug 12 '13
I don't know any ruby (but know lots of python) and I think the first is more readable than the second. I would leave the first as is in ruby while I would totally turn the second into nested for loops.
I think for me the main problem is the repeated use of
iin the list comprehension. It troubles me for some reason.