The Scheme convention for absence of a value, inherited by Racket, is to use #f
since it is the only falsy value. This make it easy to branch on the presence
or absence of a value.
Typed Racket reinforces this convention: it has an (Option t) type constructor
that is an alias for (U t #f), whic
In my state object for 2htdp, I have entries that are normally natural numbers.
When the value of a particular entry is not meaningful during a certain
activity, I could just leave the value as whatever it was before, but I would
prefer to set it to an invalid value (such as -1 or #f) to indica
2 matches
Mail list logo