The Cheffers Cookbook

Course six

The Great Bowl Shuffle

On the menu: serious stack technique β€” folding, second bowls, and a word flipped clean over.

New kitchen skills

Fold Β· a 2nd mixing bowl Β· Clean Β· Stir Β· Mix well Β· why Pour copies instead of empties.

Fold: the confusing one (on purpose)

Time to properly meet the instruction we sneak-previewed in course five:

Fold pancakes into the mixing bowl.

Read as English, that sounds like putting pancakes in. It does the exact opposite: Fold takes the top value off the bowl and stores it in the ingredient, overwriting whatever the ingredient held. It's the mirror image of Put. Yes, the wording is misleading. It's a language written as recipes; a little chaos is part of the seasoning. Just memorize the pair:

More bowls, more moves

A real kitchen has more than one bowl, and so does Chef β€” an unlimited cupboard of them. Name them by number: the 2nd mixing bowl, the 3rd mixing bowl (digits plus st/nd/rd/th; if you don't say which bowl, you mean the first). Baking dishes work the same way. And a few housekeeping moves:

InstructionWhat it does
Clean the mixing bowl.washes it out β€” the bowl is now empty
Stir the mixing bowl for 2 minutes.the top value sinks 2 places down the pile; the two above it rise one
Stir sugar into the mixing bowl.same, but the sink-depth comes from the sugar's value
Mix the mixing bowl well.shuffles the bowl into a random order

And one thing you already saw in course one, now official: Pour copies. The bowl keeps its contents after pouring into a baking dish. Pour twice, serve two helpings.

The dish-drying theorem

Here's tonight's big idea, and it's one you can prove at the sink. Take a stack of dried plates and move it to the shelf one plate at a time. The plate that was on top ends up on the bottom: moving a stack one item at a time reverses it. In course two you had to spell every message backwards by hand. Now the bowls can do the flipping for you.

The proof of the theorem is dessert. Push the letters of STRESSED into bowl one, flip them into bowl two with a Fold/Put loop, and serve bowl two:

Stressed Desserts Β· recipe Open in playground β–Ά
Stressed Desserts.

Spell STRESSED into the first bowl, flip it pancake by pancake into the second, and it comes out as DESSERTS. Proof that stacks make everything better.

Ingredients.
68 g dates
69 g eggs
83 g sugar
82 g rosemary
84 g turnips
8 pinches patience
pancakes

Method.
Put dates into the mixing bowl. Put eggs into the mixing bowl. Put sugar into the mixing bowl. Put sugar into the mixing bowl. Put eggs into the mixing bowl. Put rosemary into the mixing bowl. Put turnips into the mixing bowl. Put sugar into the mixing bowl. Flip the patience. Fold pancakes into the mixing bowl. Put pancakes into the 2nd mixing bowl. Flip the patience until flipped. Liquefy contents of the 2nd mixing bowl. Pour contents of the 2nd mixing bowl into the baking dish.

Serves 1.
Output
DESSERTS

Mid-flip, in the kitchen

The eight Puts stack up STRESSED in bowl one (top plate first: S, T, R, E, S, S, E, D β€” notice you typed the Puts in D-E-S-S-E-R-T-S order; the stack flipped it once already!). Then the loop runs eight times β€” 8 pinches patience, ticking down β€” and each lap folds one plate off bowl one into pancakes and puts it onto bowl two. Freeze-frame after three laps:

Five laps later, bowl two reads D, E, S, S, E, R, T, S from the top. Liquefy contents of the 2nd mixing bowl melts the letters, Pour contents of the 2nd mixing bowl plates them, and stress becomes dessert. The ingredient pancakes is declared with no value β€” it's just the spatula doing the flipping, one value at a time.

Why this matters beyond dinner

β€œMove a stack to reverse it” is a genuine classic of computer science β€” real compilers, calculators and undo buttons lean on exactly this move. You now know it as muscle memory: fold, put, repeat, done.

Try it
  • Serve the stress instead: delete the loop and the two β€œ2nd bowl” sentences, then liquefy and pour the mixing bowl. There's STRESSED.
  • Pour the 2nd bowl twice at the end β€” DESSERTSDESSERTS. Pouring copies; the bowl never empties.
  • Lower the patience to 4 and predict the output before you run it. (Remember: only what's in bowl two gets served.)
  • Add Stir the 2nd mixing bowl for 3 minutes. right before the liquefy and work out where the D sinks to.
  • Flip a word of your own. Palindromes make for a satisfying anticlimax.