people are paying a lot of attention to "pure" functional languages, which I
think mean ones that don't ever destroy data structures out from under
people pointing at them.  Instead, people who need different views just get
their own different views -- possibly reusing common components.

This other thing called "lazy" seems to mean that you don't need to do any
work until someone asks for the results. . . .and then you do the minimum
amount of work that's being asked for.  I've heard of a Unix analogy: if you
do a grep of just the first 5 times some pattern occurs, the whole pipeline
can shut down after those 5 are found.  The leading 'grep' needn't actually
keep scanning the file (incidentally, I'm not sure that works right on
windows/DOS pipes, where a copy of the whole file is sent across the pipe
before even finding out what's being asked for).

I'm hoping that "doall" gets rid of the laziness folks take a lot of pride
in . . . .and makes it work like DOS.  Otherwise, the timing won't really
work.  I'm asking with this question whether the contrib version is still
being lazy and returning to (time) without doing much . . . and if so, how
can I force it to actually do the work?

On Sun, Jan 25, 2009 at 11:04 AM, Emeka <emekami...@gmail.com> wrote:

> Hi e,
>
> I'm still learning the basics, very much like you( I guess you are ahead of
> me in Clojure). However, I have a question for you and not an answer to your
> questions. Why do you have doall here (def l1 (doall (take 50000
> (repeatedly #(rand-int 3000))))) . From my little knowledge of Clojure, take
> 50000 would cause 'repeatedly' to be limited to 50000 times and (repeatedly
> #(rand-int 3000) is an argument of take , so (take 50000 (repeatedly
> #(rand-int 3000) given same results as your  (doall (take 50000
> (repeatedly #(rand-int 3000)))) and by adding doall  you are just increasing
> 'noise', that's my 2 cents.
> Doall , do, dorun are used in calling  multiple functions(I hope am like
> :)), like (do (doo noot) (move "niger delta")) .........
>
> Emeka
>
>
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to