Just found out this Ruby syntax, for iterating over a hash (with an index).
hash.each_with_index { |(key,value), index| ... }
Just found out this Ruby syntax, for iterating over a hash (with an index).
hash.each_with_index { |(key,value), index| ... }