But in this particular case (calling (apply list seq)) since we want to
create a data structure that will hold the whole seq at once, then apply
will not prevent seq from being of a great length, it's the memory heap that
will.
(I think the question was more : does apply have some "hard coded"
lim
jvt wrote:
> Doesn't apply have a limit on the length of the arguments passed,
> too?
Yes.
http://groups.google.com/group/clojure/msg/34b9a170d36c5ab5
-Drew
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Clojur
Hi,
On Jul 16, 1:43 pm, jvt wrote:
> Doesn't apply have a limit on the length of the arguments passed, too?
apply is lazy.
user=> (defn foo [& args] (take 5 args))
#'user/foo
user=> (apply foo (iterate inc 0))
(0 1 2 3 4)
Sincerely
Meikel
--~--~-~--~~~---~--~~
Doesn't apply have a limit on the length of the arguments passed, too?
On Jul 16, 7:22 am, Jan Rychter wrote:
> Jarkko Oranen writes:
> > On Jul 15, 1:54 pm, Jan Rychter wrote:
> >> I've been looking for a function that would take a seq and create a list
> >> (a real clojure.lang.PersistentLis
Jarkko Oranen writes:
> On Jul 15, 1:54 pm, Jan Rychter wrote:
>> I've been looking for a function that would take a seq and create a list
>> (a real clojure.lang.PersistentList), but haven't found one. The closest
>> I got was:
>>
>> (apply list my-seq)
>>
>> Essentially, I'm looking for someth
Hi,
On Jul 15, 1:41 pm, Jarkko Oranen wrote:
> Essentially, I'm looking for something similar to (vec) that returns
> lists.
There is also list*. But that returns Cons's not a PersistentList's.
Cons is not Counted...
Sincerely
Meikel
--~--~-~--~~~---~--~~
You
On Jul 15, 1:54 pm, Jan Rychter wrote:
> I've been looking for a function that would take a seq and create a list
> (a real clojure.lang.PersistentList), but haven't found one. The closest
> I got was:
>
> (apply list my-seq)
>
> Essentially, I'm looking for something similar to (vec) that return
I've been looking for a function that would take a seq and create a list
(a real clojure.lang.PersistentList), but haven't found one. The closest
I got was:
(apply list my-seq)
Essentially, I'm looking for something similar to (vec) that returns
lists.
--J.
--~--~-~--~~