xanadu - -btree

This commit is contained in:
erana 2012-01-21 12:38:57 +09:00
parent 6502df2411
commit 62b26ba20b
1 changed files with 8 additions and 2 deletions

View File

@ -26,10 +26,12 @@
;;; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
;;; THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
(define (make-b-tree-node)
(define (make-b-tree-node left right)
(let ((numitems 0)
(numnodes 0)
(root 'foo))
(root 'foo)
(left left)
(right right))
(define (get-root)
root)
@ -48,6 +50,10 @@
get-numitems)
((eq? msg 'get-numnodes)
get-numnodes)
((eq? msg 'get-left)
get-left)
((eq? msg 'get-right)
get-right)
(else (display "b-tree-node : message not understood")))))
dispatch))