[racket] `assert' in Typed Racket
Sam Tobin-Hochstadt <samth at ccs.neu.edu>
writes:
> (assert x p?) is equivalent to (if (p? x) x (error ...)) except that
> the result is known to have the appropriate type (here `String').
Ah, OK, I think I see my mistake; is this the right way to put it?
Although the expression
(assert x string?)
has type String, and evaluates to the same value as `x' provided that
value is indeed a string, this does not mean that the expression `x' has
type String.
Thanks!
Richard