We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
select.first/last → find — Use find instead of select + first/last to stop early after finding the match.
find
select
first
last
ary.select { |x| x > 0 }.first ary.select { |x| x > 0 }.last
ary.find { |x| x > 0 }
There was an error while loading. Please reload this page.