async function add(...rest) { const ns = [...rest]; const ps = []; while(ns.length) { const n1 = ns.pop(); const n2 = ns.pop() || 0; ps.push(addRemote(n1, n2)); } const t = await Promise.all(ps); if(t.length === 1) return t[0]; return add(...t); }