Skip to content

Instantly share code, notes, and snippets.

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