In particular an immutable List with a cons operation would be welcome.
Dug around a little bit longer. This library probably comes closest: http://functionaljava.googlecode.com/svn/artifacts/2.22/javadoc/index.html . I would imagine that it would be possible to use Clojure's collection classes directly, but I'm not sure if would feel all that natural. (And I don't necessarily need to 'transactional' behaviour.)
I've written a bunch of persistent data structures in Java. My "PersistentList" is pretty close to what you want.
http://code.google.com/p/mikeralib/source/browse/trunk/Mikera/src/mikera/persistent/PersistentList.java
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With