[ANN] Finger trees in Clojurescript

186 views
Skip to first unread message

Jozef Wagner

unread,
Apr 20, 2012, 6:17:31 AM4/20/12
to clo...@googlegroups.com
I've ported finger trees from Chouser's https://github.com/clojure/data.finger-tree to the Clojurescript

You can find them at https://github.com/wagjo/ftree

With finger tree, one can make a persistent collection with amortized constant time access to elements and O(log n) append and split (insert/remove).

Jozef Wagner

Chris Houser

unread,
Apr 20, 2012, 8:13:31 AM4/20/12
to clo...@googlegroups.com
Cool

--Chouser
Laboriously typed on my mobile device.
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@googlegroups.com
Note that posts from new members are moderated - please be patient with your first post.
To unsubscribe from this group, send email to
clojure+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Cedric Greevey

unread,
Apr 20, 2012, 8:44:38 AM4/20/12
to clo...@googlegroups.com
On Fri, Apr 20, 2012 at 8:13 AM, Chris Houser <cho...@gmail.com> wrote:
> Cool
>
> --Chouser
> Laboriously typed on my mobile device.

You really need a better "mobile device" if typing a four-letter
message is "laborious". ;)

Jozef Wagner

unread,
Jan 25, 2013, 10:46:52 AM1/25/13
to clo...@googlegroups.com
New version of finger trees is released at https://github.com/wagjo/data.cljs . It is much faster and uses transients internally, where appropriate.

Moreover, this release provides functions for all kinds of data structures. Notable functionalities include:
  • fast eager variants of map and map-indexed
  • fast variants of reduce and reduce-kv
  • reduce-reverse and reduce-kv-reverse
This library is not very idiomatic though, as it provides more than a minimal set of functions and there may be redundancies  The choice of naming stuff departs from the style used in clojure.core. However, I've tried to put some order into the naming things, as IMO clojure.core is becoming a bit messy with specialized functions for individual data structures (alength, subvec, ....)

JW
Reply all
Reply to author
Forward
0 new messages