Skip to content

Instantly share code, notes, and snippets.

@mbjelac
Last active March 1, 2019 08:42
Show Gist options
  • Select an option

  • Save mbjelac/799b22bce48af9f3f595cb44904c7164 to your computer and use it in GitHub Desktop.

Select an option

Save mbjelac/799b22bce48af9f3f595cb44904c7164 to your computer and use it in GitHub Desktop.
Resolving the "Two algorithms" comment problem
function createCarrotSoup() {
carrots = buyCarrots();
onions = buyOnions();
validateFreshness([carrots, onions]);
pot = [carrots, onions, SALT];
hotPlate = startCooking(pot);
waitFor(pot =>
pot.isBoiling() ||
carrotIsCooked(pot));
hotPlate.turnOff();
}
@mbjelac

mbjelac commented Mar 1, 2019

Copy link
Copy Markdown
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment