Skip to content

cgswords/racket-rrb

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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