A promise chain links asynchronous steps: each `.then()` passes its outcome onward, while a rejection can reach a later `.catch()`. This is useful when one operation depends on another. section 31.0
function nextImage() {
return getRandomImage().then(fade).then(pause).then(nextImage);
}
The image workflow fetches an image, fades it in, pauses, then calls `nextImage` again through the chain. section 34.3
Calling `nextImage` again this way keeps extending the same chain. Instead, `repeat` starts a fresh chain each time and propagates rejection to its returned promise, avoiding unbounded chain growth; `start` can catch the rejection and restart. section 34.3
function start() {
return repeat(nextImage).catch(start);
}
`start` uses `repeat(nextImage)` and catches failures by calling `start` again. section 34.3

