Here’s the thing about handleNaN, you can return undefined if you want to.
You don’t want to have to check if you have a number or not every time you hand a value to the next function. It changes your whole API. Having a maybe means avoiding all these checks, handling at the end.
You don’t want to have to check if you have a number or not every time you hand a value to the next function. It changes your whole API. Having a maybe means avoiding all these checks, handling at the end.
Comments