Hi Timothy,
Thanks for your informative answer, which give quite clear orientation to
dig deeper into the how the fn macro works.
Simon
On Saturday, March 31, 2012 10:29:35 AM UTC+8, tbc++ wrote:
fn* is a compiler intrinsic...it's pretty low-level, it doesn't
support destructuring,. So
at a
time, producing the running sum and count each time. Then we just
apply / to divide the sum by the count.
On Mar 28, 9:18 pm, simon.T simon.j@gmail.com wrote:
The obvious way is like the following, which traverse the sequence 2
times.
Wondering what will be the efficient way
Recently, when looking into the clojure source code, core.clj in
particular,
I found multiple occurrence of 'fn*' instead of 'fn'.
Can anyone help explain what fn* is and the difference between fn and fn*
Thanks
Simon
--
You received this message because you are subscribed to the Google
The obvious way is like the following, which traverse the sequence 2 times.
Wondering what will be the efficient way...
(defn avg [coll]
(/ (reduce + coll) (count coll)))
--
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send