• Functional binary tree (Clojure)

    From Dan Lentz@21:1/5 to All on Wed Apr 7 12:18:33 2021
    I apologize for posting about a Clojure library, however most of the time i spent learning about functional data structures was in Common Lisp and in some ways the fact that this particular implementation is in Clojure is incidental. In any event, I’
    d very much appreciate any feedback.

    The library resides at https://github.com/dco-dev/interval-tree. The abstract tree itself is here: https://github.com/dco-dev/interval-tree/blob/master/src/com/dean/interval_tree/tree/tree.clj

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Paul Rubin@21:1/5 to Dan Lentz on Wed Apr 7 19:02:07 2021
    Dan Lentz <danlentz@gmail.com> writes:
    I apologize for posting about a Clojure library, however most of the
    time i spent learning about functional data structures was in Common
    Lisp and in some ways the fact that this particular implementation is
    in Clojure is incidental.

    You might like Jeff Okasaki's book "Purely Functional Data Structures".

    I'll look at your implementation if I get a chance but yeah, Clojure
    uses a lot of them and Haskell uses even more. Common Lisp tends to use
    more traditional, mutable data structures.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Arseny Slobodyuk@21:1/5 to All on Thu Apr 8 11:57:36 2021
    I apologize for posting about a Clojure library, however most of the time i spent learning about functional data structures was in Common Lisp and in some ways the fact that this particular implementation is in Clojure is incidental. In any event, Iâ€
    ™d very much appreciate any feedback.

    The library resides at https://github.com/dco-dev/interval-tree. The abstract tree itself is here: https://github.com/dco-dev/interval-tree/blob/master/src/com/dean/interval_tree/tree/tree.clj

    A far as I could understand your tree library is based on the abstract
    tree, but where is the actual tree? I mean what is the relation between
    these?

    Also do you use it for something?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dan Lentz@21:1/5 to Arseny Slobodyuk on Thu Apr 8 03:59:04 2021
    Hi, yes. The root of the library contains a short readme: https://github.com/dco-dev/interval-tree

    The functional binary tree is: https://github.com/dco-dev/interval-tree/blob/master/src/com/dean/interval_tree/tree/tree.clj

    An Ordered Set implementation based on the tree resides: https://github.com/dco-dev/interval-tree/blob/master/src/com/dean/interval_tree/tree/ordered_set.clj

    One purpose of the tree is to provide an extensible, foldably parallel data structure. Ie, efficiently able to work across regions of the tree concurrently.

    We do use this in production in, mostly for the interval maps and fast ordered sets.




    On Wednesday, April 7, 2021 at 9:57:42 PM UTC-4, Arseny Slobodyuk wrote:
    I apologize for posting about a Clojure library, however most of the time i spent learning about functional data structures was in Common Lisp and in some ways the fact that this particular implementation is in Clojure is incidental. In any event, Iâ€
    ™d very much appreciate any feedback.

    The library resides at https://github.com/dco-dev/interval-tree. The abstract tree itself is here: https://github.com/dco-dev/interval-tree/blob/master/src/com/dean/interval_tree/tree/tree.clj
    A far as I could understand your tree library is based on the abstract
    tree, but where is the actual tree? I mean what is the relation between these?

    Also do you use it for something?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)