I'm just full of little ideas today. One I'm trying out, returning NaN in math functions. It's JavaScript's Maybe type for numbers.
Then, you need to `handleNaN` down the chain.
Might even be interesting and treat this like a `Task` and force you to call fork() before you get the value 🤔
Then, you need to `handleNaN` down the chain.
Might even be interesting and treat this like a `Task` and force you to call fork() before you get the value 🤔
Comments
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.