Skip to content

Instantly share code, notes, and snippets.

@mattsoutherden
Created April 16, 2010 15:31
Show Gist options
  • Save mattsoutherden/368562 to your computer and use it in GitHub Desktop.
Save mattsoutherden/368562 to your computer and use it in GitHub Desktop.
beans = [:arabica, :robusta]
beans.reject { |type| type == :robusta }
beans.flatten!
beans.compact!
espresso = beans.inject(:steam) {}
frapuccino = ([[:milk]] << [espresso]).freeze
frapuccino.take_while { |cup| !cup.empty? }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment