Skip to content

Instantly share code, notes, and snippets.

@Cryptochris
Created December 15, 2015 19:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Cryptochris/cb3abd6923147ca32d57 to your computer and use it in GitHub Desktop.
Save Cryptochris/cb3abd6923147ca32d57 to your computer and use it in GitHub Desktop.
def odd_sum(*numbers)
odd_numbs = Proc.new { |numbers| numbers % 2 != 0 }
add = numbers.select(&odd_numbs)
math = Proc.new { |n| n + n}
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment