[plt-scheme] Checking to see if a key is present in a hash table

From: Gregory Woodhouse (gregory.woodhouse at sbcglobal.net)
Date: Sat Feb 25 18:46:10 EST 2006

On Feb 25, 2006, at 3:40 PM, Jens Axel Søgaard wrote:

>
> Am I missing something, why not just
>
> (define (bound? t s)
>   (hash-table-get t s (lambda () #f)))
>
> ?

I knew the failure thunk would be called, but I didn't know that the  
value it returned would be returned as the value of hash-table-get.

===
Gregory Woodhouse
gregory.woodhouse at sbcglobal.net

"The finger pointing at the moon is
not the moon."
--Buddhist saying





Posted on the users mailing list.