Skip to content

Instantly share code, notes, and snippets.

@daviddavis
Created February 12, 2012 16:41
Show Gist options
  • Select an option

  • Save daviddavis/1809566 to your computer and use it in GitHub Desktop.

Select an option

Save daviddavis/1809566 to your computer and use it in GitHub Desktop.
# Solution to #{problem.title}
# by david
# http://lh:3000/problems/blackjack
def twenty_one?(*cards)
21 == cards.inject(:+)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment