One of the features that allows functional programs to perform well in languages like Scala and Clojure is the presence of immutable collections, based on persistent data structures. These allow for a lot of sharing of data and so new, modified versions of collections can be created with very low cost.
Java 8 introduces streams to allow functions to be chained without recomputing the intermediate results - the functions are just composed in sequence onto each element of the stream, as I understand it. That's similar to lazy sequences in Clojure and addresses that one use case of pipelining, but it doesn't address general operations on collections.
In languages with Persistent Data Structures, you can have a large hash map and have a function that alters just one key in a pure way, returning a new version of the hash map that shares nearly all its data with the original. In Clojure:
Questions for Richard:
do you feel that the lack of persistent data structures in Java 8 is an obstacle to adopting a functional style?how would you tackle functions that needed to behave like the assoc example above in Java 8?