I have a list of jobs that should be sequentially executed.
As the jobs take seconds to be finished the should run in the background.
I thought that a job could be described as 

```
interface Job {
    name: string
    execute(): Promise<boolean>
}

```

I would like to have a function which takes this list of jobs and execute them sequentially
until the list is completed or one job fails or is rejected, so basically:

```
function executeUntilFailed(jobs: Job[]): Promise<boolean> 
{
    // execute first job
    // if this job
    //   - returns with true: continue with the next job
    //   - returns with false: resolve the promise with false
    //   - got rejected: reject the promise with the reason prefixed with the jobs name
    //
    // if there are no more jobs to do, resolve the promise with true
    //
    // basically it's a reduce operation with starting value of true and 
    // early stops if one job yields false or got rejected
}

```

I'm rather new to Javascript/Typescript and have a hard time implementing this.

Thanks,
Dieter