Any Suggested Persistent Data Structure Library for Kotlin


#1

Hi, unlike Clojure and Scala, Kotlin do not have the Persistent Data Structure Library as its standard library 。 Is there any good library to suggest?


#2

See Kotlinx.collections.immutable v0.1 has been published


#3

I started Kotlin developing a library of immutable/persistent
data structures. Some of the sources are dated October 2012! The
library has been regularly maintained and upgraded. The most
recent revision employs sealed classes. In turn, the library
supports other Kotlin code I have developed.

The library includes the following data types: Option, Either,
Try, List, Map, Set and RedBlackTree. Most are based on Okasaki’s
seminal book. Additionally, there is hash array mapped trie
implementations for Map and Vector (following Bagwell/Hickey).

If this is what you are looking for I would be happy to publish
the code.

Ken


#4

Is this library production ready now?


#5

Yes, This is what i am looking for.


#6

If I release the code you can make your own assessment.
I am publishing a set of notes on Kotlin (see Kotlin programming notes on this site).
If I skip ahead a few chapters and post the notes on functional data structures you can see the user/implementation details.
I will go there first and you can let me know.

Ken


#7

I have prepared the first edition of a library of immutable/persistent
data structures. This first version of the library includes the following
data types: Option, Either, Try, List, Map and Set. Most are inspired by
the corresponding types found in Haskell.

I have started a series of notes on Programming in Kotlin.

Chapter 13: Functional Data Structures

has been added to the series. It can be used as a user guide/
implementation guide for the persistent data structures.

The reading materials can be found at: Kotlin programming notes.

[https://docs.google.com/document/d/1ZDnuTkubfvrjsht3xoZf3L3rQHAMyGt-ZB09SU5xCdk/pub]

This is a first draft, so let me know what you think.
If this is what you are looking for I would be happy to publish
the code.

Thanks in advance, Ken