Home

Awesome

Finger trees and miscellaneous functions for ClojureScript data structures.

Overview

Finger trees are based on https://github.com/wagjo/ftree which is based on https://github.com/clojure/data.finger-tree

Resources on finger trees:

Usage

Add the following dependency to your project.clj file:

[com.wagjo/data-cljs "0.1.0-SNAPSHOT"]

Introduction

Most of functions working with data structures use polymorphism. This is slow (as of early 2013) in ClojureScript. Faster variants are implemented here in separate namespaces. Faster variants does not have plymorphism nor multiple arities.

Nearly every data manipulation function works with seqs. In ClojureScript, this is very slow, e.g. for use in games (see Chris Granger's talk). Specialized functions (e.g. for arrays and vectors) are placed directly in clojure.core namespace and are given a strange names (alength, subvec). This library provides separate namespace for each data structure.

Functions are provided for following data structures:

Notable functionalities include:

This library provides a fast finger tree implementation. Until https://github.com/michalmarczyk/flexvec gets ported to CLJS, finger trees are good candidate for data structure which provides fast insert/remove.

Note that most of functions for persistent vector are very slow. This too will be fixed when flexvec gets ported.

List of functions

Following functions are provided for each data structure. Moreover, some data structures provide additional functions, e.g. array provides additional mutating functions.

Creation

Access

Modify

Use

License

Copyright (C) 2011, 2012, 2013 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.