That is how I wrote the collectable implementation, and it would also raise an exception if it was given a tuple with an unexpected shape. Ultimately I agree with you and @FlyingNoodle that using a protocol isn’t a good approach.
I ended up creating a Result stuct with a collectable implementation with similar behavior.
@mudasobwa I should have been more clear in my examples. I used Enum.reduce_while/3 to illustrate that the desired outcome was that the first error encountered would be the result for the collectable.






















