Skip to content

Instantly share code, notes, and snippets.

@repomaa
Created April 19, 2013 11:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save repomaa/5419892 to your computer and use it in GitHub Desktop.
Save repomaa/5419892 to your computer and use it in GitHub Desktop.
def draw n=6
draw_all(n).each do |number|
break unless number
yield number
end
end
def draw_sorted n=6
draw_all(n).sort.each do |number|
break unless number
yield number
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment