3 ms·
Mutation everywhere, no thank you. This approach requires one to keep the state in mind while manually "evaluating" the mutations along the way, forming a pict
by zelphirkalt 3y ago
Mutation everywhere, no thank you.
This approach requires one to keep the state in mind while manually "evaluating" the mutations along the way, forming a picture, or whatever one uses, in mind about the created artifact.
- mrkeen 3y agoCorrect. Especially when there's mixing of in-place mutation and return-values. The first function in the green: func createPizza(order) { pizza = prepare(order) bake (pizza) box (pizza) return pizza } `prepare` transforms an order into a pizza, but `bake` and `box` mutates one in-place.