The first question that springs to mind is "where do I place the breakpoint so I can see the current state of this algorithm?"
This was my first question as well :)
I get that you don't like (nor do I):
std::optional<image> get_cute_cat (const image& img) {
return crop_to_cat(img)
.and_then(add_bow_tie)
.and_then(make_eyes_sparkle)
.transform(make_smaller)
.transform(add_rainbow);
}
I'm curious if you would allow the pre-P0798 version:
image get_cute_cat (const image& img) {
return add_rainbow(
make_smaller(
make_eyes_sparkle(
add_bow_tie(
crop_to_cat(img))));
}