cachaito
9/1/2016 - 7:59 AM

A fresh look at callbacks

//synchronously mode
action3(action2(action1()));

//or if the operation is chainable
action1().action2().action3();

//more sophisticated example (in other usage)
var res = action1();
res = (res ? action2() : action3());
action4(res);