main.scm
1
2
3
4
5
6
7
8
9
10
11
12
; constructor
(define ht (make-hashtable equal-hash equal?))

; set value for key
(hashtable-set! ht "key" "value")

; check if a key has a value
(print (hashtable-contains? ht "key"))

; get a value from a hash table
(print "should be there: key = " (hashtable-ref ht "key" "not there"))
(print "should NOT be there: foo = " (hashtable-ref ht "foo" "not there"))
BiwaScheme Interpreter version 0.6.4 Copyright (C) 2007-2014 Yutaka HARA and the BiwaScheme team