3 ms·
> No, I didn't misunderstand. 'Nothing' and 0 are not interchangeable. Nobody said they were. That's idiomatic Haskell for something like this in Java when unb
by mercurial 14y ago
> No, I didn't misunderstand. 'Nothing' and 0 are not interchangeable.
Nobody said they were. That's idiomatic Haskell for something like this in Java when unboxing Integers:
return (a != null ? a : 0) + (b != null ? b : 0);
As you can see, there is no adding Nothing to integers.