[racket] string->number failure value

From: Neil Toronto (neil.toronto at gmail.com)
Date: Tue Aug 16 11:28:01 EDT 2011

On 08/16/2011 09:10 AM, Marijn wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi Carl,
>
> On 08/16/11 15:45, Carl Eastlund wrote:
>> Writing (or (string->number str) default) has the same effect, since
>> #f never indicates a success.  The same is not true of hash-ref,
>> where #f can be a value in the hash table; that's why it needs an
>> explicit default argument.
> That is a good point, thanks.

Not at all obvious, though. I'd submit a "bug report" for an example to 
be put in the docs.

Neil T



Posted on the users mailing list.