I inherited some Java code that does the following:
1) it receives from Clojure a LazySeq object (which is made up of a number of PersistentHashMap objects)
2) it then passes this same LazySeq object (unchanged) back to a Clojure script where it is converted into a String and passed back to Java
The issue is that inside the Java code after step (1) and before step (2), I need to modify some of the PersistentHashMap objects inside the LazySeq and then proceed to step (2). Something like:
LazySeq seq = clojureFunctionReturningLazySeq();
//update the elements of the sequence
String result = clojureFunctionReceivingLazySeq(seq);
I cannot modify the Clojure script itself and the updating of the LazySeq has to happen inside the Java code. I checked the LazySeq API and I cannot find a method to modify (or add) an element.
Thank you,
Chris