It's not terse, but it is easier to follow.
(defn flip
[f x y]
(f y x))
(defn update-nums
[m f]
(update m :qs
(fn [x]
(flip map x
(fn [x]
(update-in x [:nums]
#(map f %)))
;; (update-nums m inc
Taking a quick look at this, I *think* the problem crops up in your tasks
being a lazy sequence.
Modify this
(def tasks (ref (range 1 1000)))
to this
(def tasks (ref (doall (range 1 1000
Running that with your large endpoint was taking a lot of time, so I'd
suggest running it wit
This looks like it's doing too much work to simply generate a random
integer. Are you sure you want to build a lazy list of 999,000 integers
and randomly select into it for every invocation? The garbage collector
will be working overtime.
(defn update-individual [json-string]
(assoc-in json
Meikel & Jeff,
Thank you. That really helped me get over the current hump. But as I
encounter more, I'm realizing I need to learn a lot more about the
Java interop.
Thanks,
- Hitesh
--~--~-~--~~~---~--~~
You received this message because you are subs
foo(a,b)
puts a
puts b
end
x = [1,2]
foo *x
1
2
Any ideas?
Thanks,
Hitesh
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to this group, send email to clojure@googlegroups