|
|
|
|
|
by dancek
2453 days ago
|
|
What parts of compatibility are missing? The interop works just fine, as with all other Java. ; example: Stream.of(1,1,2,3,5).map(x -> 2*x).collect(Collectors.toList())
user=> (.. (java.util.stream.Stream/of (to-array [1 1 2 3 5]))
(map (reify java.util.function.Function
(apply [this x] (* 2 x))))
(collect (java.util.stream.Collectors/toList)))
[2 2 4 6 10]
Of course it's not practical to convert lists and functions to their Java counterparts like that, but if you need to work with Java objects it's possible. |
|