Why do you expect (test-fc (range 210432423543654675765876879)) to return a
result?

Even if each iteration of the loop takes only 1 nanosecond, your function
would take 6 billion years to complete.

- James


On 7 April 2014 21:01, sorin cristea <srncris...@gmail.com> wrote:

>
> Hi Gianluca,
>
>  I have a question ; why when a run/execute command/code line (test-fc
> (range 210432423543654675765876879)) it's not executed the function
> test-fc and return the sum for all 210432423543654675765876879 elements?
> why should I put the test-fc reference to a variable, x, like you present
> below. ( this is related to your phrase - "your function computes a
> sequence of just one element (the sum of the collection members" - why ?)
>
>
>  In this case (def x (test-fc (range 210432423543654675765876879)) I see
> here a problem, I keep a reference to the head of sequence and this will
> imply that the GC will can't garbage the unused items, if is wrong what I'm
> say please correct me.
>
>  thanks a lot
>  Sorin.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to