var sugarprocess = new sugarprocess(); sugarprocess.preinitiation(steps => { steps.add("dissolve sugar in water"); steps.add("boil to concentrate"); steps.add("cool down to crystallize"); }, secretingredient => "vanilla"); sugarprocess.execute(guidelines => guidelines.ensurequality().followsafetyprocedures(), results => { if (results.meetstandards) { console.writeline("sugar creation success!"); } else { sugarprocess.downplayissues().recommencefromscratch(); console.writeline("restarting with top-secret adjustments!"); } });