Augusto Moura (2018-04-12T21:02:45.000Z)
augusto.borgesm at gmail.com (2018-04-12T21:22:16.908Z)
Also it can be already be implemented in user land with high orders functions: ``` js const sleep = promised(function (time) { window.setTimeout(() => this.resolve(), time); }); ``` A simple implementation of a `promised` helper ``` js const promised = (fn) => (...args) => { let target; const promise = new Promise((resolve, reject) => { target = { resolve, reject }; }); fn.apply(target, args); return promise; } ```