Hacker News new | ask | show | jobs
by airstrike 2452 days ago
Slightly off-topic, but as someone who's normally using Python / R, my hands feel tired just from thinking about typing all of that
2 comments

In practice, you wouldn't. You'd import at the top of the file, then type `Stream/of` instead of `java.util.stream.Stream/of`.

I almost never use Java directly though because there are so many great Clojure wrappers.

In Clojure that's:

  (map (fn [x] (* 2 x)) [1 1 2 3 5])
  => (2 2 4 6 10)