Message from JavaScript discussions

January 2019

— Can even pass args to continue, in order to return a value from halt

— 

const Halter = () => {
const waiting = [];
return {
hlt: () =>
new Promise(resolve =>
waiting.push(resolve)),
continue: x =>
waiting
.splice(0, Infinity)
.map(f =>
f(x))
.length
};
};

— (Didn't need spread)

— Https://github.com/nodejs/node/issues/25348

determin1st

— Works with your exact example

— Oke, ill test it. you said later that async vs promises are interchangeable, seems that's not true

— Oh?

— Where is it not?

— You made it on async/await, right

— I made it with promises

— I'm using it with async / await

— I could also use it with promises