Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I actually don't like recipes written in an imperative style and I don't think this is how cooks think about them internally. They are the norm for written recipes, but whenever I read one I (and I assume other experienced cooks) translate it into a functional style for internal storage.

Consider a recipe for macaroni cheese. In imperative style it might be written like this:

Thread 1, step 1: melt butter, add flour, gradually beat in milk, simmer.

Thread 1, step 2: remove sauce from heat and stir in cheese.

Thread 2, step 1: bring water to boil, add salt, add 125g of pasta, simmer.

Thread 2: step 2: drain pasta.

Join threads: Fold pasta into sauce and serve.

Nobody thinks about how to make macaroni cheese like this. My internal record for macaroni cheese is more like this:

"Basically it's macaroni and cheese sauce mixed together. You cook pasta in boiling water with salt. Cheese sauce is béchamel sauce with grated cheese. Béchamel sauce is made with a roux and milk. A roux is butter and flour."

In fact, if you look in any decent cookery book, the information will be stored like this. A good book teaches you techniques and builds up raw ingredients into basic building blocks and then final recipes. Only a stupid book tells you how to make béchamel sauce 20 times because 20 different dishes use it.



Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: