Hi,
I'm wondering whether (apply concat ...) can be re-written to be
lazy.

-------Expected behavior-------

(def temp (for [i (range 20)]
            (do (println i)
                [i i i])))

(def temp2 (apply concat temp))

Should print nothing.

-----Behavior in 1.1.0-RC-----
Under Clojure-1.1.0-rc, the operation was "somewhat" lazy.

Prints:
0
1
2

-----Behavior in 1.1.0------
The operation is eager.

Prints:
0
1
2
...
19

---------------------

I'm hoping it's possible to do this as it would be very useful, but
I'm not sure whether the semantics of apply allow this to be done. It
sort of half-worked in 1.1.0-RC so I'm optimistic.


Thanks for your opinions
  -Patrick

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

Reply via email to