Skip to content

cgswords/racket-rrb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

racket-rrb

Racket RRB Tree Implementation (current WIP)

To Install:

$ raco pkg install git://github.com/cgswords/racket-rrb

or

$ git clone git://github.com/cgswords/racket-rrb
$ cd racket-rrb
$ raco pkg install

Usage

The structure provides the following functions:

rrb-ref          ;; RRB a -> Int -> a
rrb-set          ;; RRB a -> Int -> a -> RRB a
rrb-push         ;; RRB a -> a -> RRB a
rrb-concat       ;; RRB a -> RRB a -> RRB a
rrb-print-tree   ;; RRB a -> Void 
rrb-count        ;; RRB a -> Int 
make-rrb         ;; Int -> RRB Int \/ Int -> a -> RRB a
rrb?             ;; any -> Bool

Each works about as expected; here, set is persistent (and thus sort of expensive).

To Do

  • Reimplement concat to be less lazy about how it concatenates trees.
  • Document more of the code.
  • Remove some of the excessive vector operations (such as build-slot-sizes).
  • Contracts?

About

Racket RRB Tree Implementation

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages