Imagine a function that reads a settings file and checks whether the values make sense. If the file changes, the same call can give a different answer, even though the function received the same filename.
In TypeScript, 0.1 + 0.2 === 0.3 is false; the sum is 0.30000000000000004. The equality check fails because binary floating-point can’t represent some decimal fractions exactly.
Panackelty doesn’t need a universal null value. Option[T] says a value may be present or absent; Result[T,E] distinguishes success from failure; and Unit is the value used for success with no result data.
Let’s start by looking at an example of Unit. Writing a file gives the caller no file contents back, but the write can still succeed or fail. Panackelty represents both outcomes with a Result.