Re: What is fn*, fn suffixed with asterisk?

2012-04-05 Thread simon.T
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

Re: What's the efficient functional way to computing the average of a sequence of numbers?

2012-03-30 Thread simon.T
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

What is fn*, fn suffixed with asterisk?

2012-03-30 Thread simon.T
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

What's the efficient functional way to computing the average of a sequence of numbers?

2012-03-29 Thread simon.T
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