We could make the return type Maybe Int . The canonical tests for this exercise don't have an error cases as it supposed to be an easy exercise. So I haven't made that change.
Done. This will boost the difficulty of resistor-color-duo / resistor-color-trio, and I like to keep the resistor-color exercises together, so I have boosted the resistor-color difficulty.
We could make the return type
Maybe Int
. The canonical tests for this exercise don't have an error cases as it supposed to be an easy exercise. So I haven't made that change.