4 ms·
You can think of Nothing and Just as functions that construct a MaybeInteger. Nothing takes no parameters because there's no value there, so why would it? Jus
by Quekid5 7y ago
You can think of Nothing and Just as functions that construct a MaybeInteger.
Nothing takes no parameters because there's no value there, so why would it?
Just takes an integer and gives you a MaybeInteger containing the integer you supplied to it.
There is only a single type here, namely MaybeInteger.