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

From: Lauri Alanko (la at iki.fi)
Date: Sat Feb 25 18:36:15 EST 2006

On Sat, Feb 25, 2006 at 03:28:10PM -0800, Gregory Woodhouse wrote:
>  (define (bound? t s)
>    (call/cc
>     (lambda (k)
>       (let ((x
>              (hash-table-get t s (lambda () k #f))))
>         k #t))))

Btw, use (let/ec k foo) instead of (call/cc (lambda (x) foo)). It's
neater and more efficient.


Posted on the users mailing list.