xanadu - xml-tree

This commit is contained in:
erana 2012-01-21 22:05:50 +09:00
parent 3f9ecfa9e8
commit 1c3e8e179d
1 changed files with 4 additions and 4 deletions

View File

@ -93,14 +93,14 @@
)))) ))))
(define (search-rec str tree side-string) ;; root param in b-treenode (define (search-rec str tree side-string) ;; root param in b-treenode
(let* ((side-tree ((tree side-string))) (let* ((side-tree (tree side-string))
(len (vector-length side-tree))) (len (vector-length side-tree)))
(do ((i 0 (+ i 1))) (do ((i 0 (+ i 1)))
((let* ((side-tree-el-first ((vector-ref side-tree i)))) ((let* ((side-tree-el-first (vector-ref side-tree i)))
(cond ((>= i len 1);;last node (cond ((>= i len);;last node
(do ((j 0 (+ j 1))) (do ((j 0 (+ j 1)))
((= j len) 0) ((= j len) 0)
(search-rec str (vector-ref j side-tree)))) (search-rec str (vector-ref side-tree j))))
((let ((side-tree-el-second ((vector-ref side-tree (+ i 1))))) ((let ((side-tree-el-second ((vector-ref side-tree (+ i 1)))))
(and (string<? str (and (string<? str
((side-tree-el-first 'get-data))) ((side-tree-el-first 'get-data)))