464933 (1) [Avatar] Offline
The coffee purchase example in the first chapter decouples the creation of a coffee with the processing of the purchase by creating a purchase object to be processed separately. How do I guarantee that the purchase went through before I make the coffee? This is something that the original example has: it will not return a coffee unless the purchase has gone through. The functional example creates the coffee and the purchase, the purchase will then be processed separately guaranteeing no side effect on the creation of the coffee but it seems that we need a side effect in that case.