Return the first successful result. If every input fails, collect all errors into an array.
const charged = any([chargeCard(order), chargePaypal(order), chargeBank(order)]) // ok(receipt) on first success, or err([e1, e2, e3]) Copy
const charged = any([chargeCard(order), chargePaypal(order), chargeBank(order)]) // ok(receipt) on first success, or err([e1, e2, e3])
Return the first successful result. If every input fails, collect all errors into an array.