def isfin? @matrix[0..@col_count-1][0]==0 end How to use Ruby's iterators? For example, you need to return true if all elements of the array [n] [0] (where n from 0 to "array length - 1") are equal to zero. Or is it better to use a simple loop in this case?
For example, if we have 0..200 , and the second position is no longer 0 , then you can exit with false and not view the other elements. Or when using iterators, this condition will be automatically taken into account, and will not work more slowly?