/** Map one item at a time, preserving order and stopping before the next operation on failure.
* Use for dependent mutations or to cap GitHub requests and file handles at one in flight.
*/
export async function mapSequentially(
items: Iterable,
operation: (item: Input, index: number) => Promise