Re: [racket-users] Representing invalid values for non-negative integer variables

2015-10-11 Thread Alexis King
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

[racket-users] Representing invalid values for non-negative integer variables

2015-10-11 Thread Byron Davies
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