views:

270

answers:

2

Looks like R5RS language in DrScheme does not come with hashtable library..

when I run (make-hash-table) it throws an error...

Pretty Big has support for hashtable but does not support mutable pairs..

so I am stuck making one of them work for me ..

How do I add support for hashtable in R5RS?

thanks

+2  A: 

I wasn't sure of how to do this either, but found how to import a module in r5rs:

(#%require scheme)

then...

(define h (make-hash))

etc...

flatline
+2  A: 

If you don't care about what "language" you use, you might just use R6RS. Here is how to get what you want in R6RS:

#!r6rs

(import (rnrs)
        (rnrs mutable-pairs))


(define foo (make-eqv-hashtable))

(define bar (list 'a 'b))

(write bar) (newline)

(set-car! bar 'Z)

(write bar)
grettke