source: project/release/4/trie/trunk/tests/run.scm @ 25594

Last change on this file since 25594 was 25594, checked in by Ivan Raikov, 9 years ago

initial import of a trie implementation

File size: 372 bytes
Line 
1(use trie)
2
3(define t (make-trie char=? string->list ))
4
5(define t1 ((t 'insert) "key1" 'test1))
6(define t2 ((t1 'insert) "key2" 'test2))
7
8(assert (equal? 'test1 ((t1 'lookup)  "key1")))
9(assert (equal? 'test2 ((t2 'lookup)  "key2")))
10
11(define t3 ((t2 'lookup/partial)  "key"))
12
13(assert (equal? 'test1 ((t3 'lookup)  "1")))
14(assert (equal? 'test2 ((t3 'lookup)  "2")))
15
16
17
Note: See TracBrowser for help on using the repository browser.