Skip to content

Instantly share code, notes, and snippets.

Created May 5, 2015 16:25
Show Gist options
  • Save anonymous/6890ba062e6af6362a7e to your computer and use it in GitHub Desktop.
Save anonymous/6890ba062e6af6362a7e to your computer and use it in GitHub Desktop.
multiples_of_3 = Proc.new do |n|
n % 3 = 0
end
(1..100).to_a.select(&multiples_of_3)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment