Re: [racket] `assert' in Typed Racket

2011-05-24 Thread Sam Tobin-Hochstadt
On Tue, May 24, 2011 at 1:41 PM, Richard Lawrence wrote: > Sam Tobin-Hochstadt > 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 pu

Re: [racket] `assert' in Typed Racket

2011-05-24 Thread Richard Lawrence
Sam Tobin-Hochstadt 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,