Created
February 25, 2010 15:47
-
-
Save tmountain/314651 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/local/bin/clj | |
(use 'clojure.contrib.str-utils) | |
(def breads ["rye" "whole wheat" "pita" "pancake" "pumpernickel" "egg loaf" | |
"sweet potato" "wheat gluten" "banana" "sprouted grain" | |
"ice cream"]) | |
(def toppings ["bleu cheese" "jalapeno" "olive" "maple syrup" "cucumber" | |
"chipotle" "onion" "mushroom" "swiss cheese" "cheddar cheese" | |
"pickle" "hot dog" "bratwurst" "mustard" "ketchup" | |
"gravy" "honey" "lemon" "sausage" "soysage" "cream cheese" | |
"avocado" "salsa" "sauerkraut" "almonds" "cranberries" "broccoli" | |
"garlic"]) | |
(def sides ["hash browns" "toast" "eggs" "pancakes" "rice with potatoes" | |
"yogurt" "fruit" "apples cut with the same knife as the garlic"]) | |
(def portion-size ["heaping helping" "side" "tiny serving" "mountain" | |
"fucking gigantic serving" "load" "pile"]) | |
(def egg-options ["scramble" "omelet"]) | |
(defn rand-elt | |
[s] | |
(nth s (rand-int (count s)))) | |
(def bread (rand-elt breads)) | |
(def topping (set (for [x (range (rand-int (count toppings)))] | |
(rand-elt toppings)))) | |
(println "Today's Menu") | |
(println "-------------------") | |
(doseq [x (range 4)] | |
(let [bread (rand-elt breads) | |
toppings (set (for [x (range (inc (rand-int 5)))] | |
(rand-elt toppings))) | |
side (rand-elt sides)] | |
(println (re-gsub #"\s+" " " | |
(str (str "#" (inc x)) " " bread " bread, " | |
(str (str-join ", " (take (dec (count toppings)) toppings)) | |
" and " (last toppings) " " (rand-elt egg-options)) | |
" with a " (rand-elt portion-size) " of " side))))) | |
(println "\nNO SUBSTITUTIONS!") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment