Just an idea that popped into my head... Maybe I can use variant for the input/output types? I haven't looked at it yet, so I'm not sure what it does, or the performance costs.

I realized that because the final callback always gets called, and the types of the intermediate steps may be different, there is actually no way at all to define a completely uniformly type safe final callback...

although the point is a little moot, because the only way you end up in the final callback is either by an Exception or a Result from the finalCallback - 1 step.

So you can actually never get both an Exception and a Result

Reply via email to