Skip to content

Instantly share code, notes, and snippets.

@DavidMikeSimon
Created April 21, 2016 18:09
Show Gist options
  • Select an option

  • Save DavidMikeSimon/95dd0a0643c364591e4a47433f6877f9 to your computer and use it in GitHub Desktop.

Select an option

Save DavidMikeSimon/95dd0a0643c364591e4a47433f6877f9 to your computer and use it in GitHub Desktop.
arr = (1..10).to_a
enumerator = arr.select.each {|i| puts "AT #{i}"; i > 2}
puts "ANY? #{enumerator.any?}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment