Pattern: Missing use of last(n).reverse
/last
Issue: -
Identifies places where reverse.first(n)
and reverse.first
can be replaced by last(n).reverse
and last
.
# bad
array.reverse.first(5)
array.reverse.first
# good
array.last(5).reverse
array.last