Follow

That despite writing code for over a decade, TIL that NaN is not just a numerical equivalent of null. It’s closer to a primitive form of Maybe/Optional, in the sense that arithmetic operators are designed to output NaN should any of their inputs be NaN thereby propagating the error state in a similar fashion to monadic composition.

Sign in to participate in the conversation
CleverLibre Social

CleverLibre Social is an inclusive social instance for open discussion, learning, and community.
All cultures welcome.
Hate speech and harassment strictly forbidden.