Home

Awesome

Deprecation warning

This library is deprecated in favor of https://github.com/wagjo/data.cljs

Finger trees in Clojurescript.

Overview

Forked from https://github.com/clojure/data.finger-tree

Library is finished but tests, examples and proper packaging is not done.

Resources on finger trees:

Usage

Library is not packaged, you should copy ftree source files directly to your project.

List of functions:

Examples

(ns foo.bar
  (:require [ftree.measure :as fm]
            [ftree.cdl :as fcdl]
            [ftree.core :as ftc]))

...

(fm/set-measure! fcdl/counted-measure)

(let [x (fcdl/create :a :b :c :d :e :f)]
  [x (first x) (rest x)])

(let [x (fcdl/create :a :b :c :d :e :f)]
  [(ftc/conjl x 1) (ftc/conjr x 1) (ftc/peekl x) (ftc/popr x)])

(let [x (fcdl/create :a :b :c :d :e :f :g :h :i :j :k :l :m :n :o)]
  [(fcdl/replace-at x 13 20 [:X :Y :Z])
   (fcdl/dropr x 4)
   (fcdl/insert-before x 10 :X :Y :Z)])

License

Copyright (C) 2012, Rich Hickey, Chris Houser, Jozef Wagner.

The use and distribution terms for this software are covered by the Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php) which can be found in the file epl-v10.html at the root of this distribution.

By using this software in any fashion, you are agreeing to be bound by the terms of this license.

You must not remove this notice, or any other, from this software.