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
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.