My bad - fixed in 1.6!
On Friday, February 15, 2013 9:15:31 PM UTC, Denis Washington wrote:
>
> Hi,
>
> I just solved the "Replicate a Sequence" problem on 4clojure [1] using
> "interleave". However, I noticed that "interleave" cannot be called with
> a single argument. My first attempt at solv
Hi Denis,
This should also work, but fails for the same reason you outline:
#(apply interleave (repeat %2 %1))
The jira ticket says the enhancement was closed in V1.3 although it is
still failing in V1.5.1.
P.
On Friday, February 15, 2013 9:15:31 PM UTC, Denis Washington wrote:
>
> Hi,
>
>
There's a ticket requesting that enhancement:
http://dev.clojure.org/jira/browse/CLJ-863
Andy
On Feb 15, 2013, at 1:15 PM, Denis Washington wrote:
> Hi,
>
> I just solved the "Replicate a Sequence" problem on 4clojure [1] using
> "interleave". However, I noticed that "interleave" cannot be
At the end, the problem is apply
(apply + '(1 2 3 4 5 6 7 8 9 10)) is ~60 times slower than (+ 1 2 3 4 5 6
7 8 9 10)
--
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 n
You are right, but still:
> (time (dotimes [_ 100] (dorun (apply mapcat list [[1 2 3] [7 7 7]]
"Elapsed time: 4177.113292 msecs"
> (time (dotimes [_ 100] (dorun (interleave [1 2 3] [7 7 7]
"Elapsed time: 1156.658738 msecs"
:-)
Stathis
On Thursday, 4 October 2012 14:46:09 UTC+1,
Hi,
you should probably add some dorun somewhere.
Kind regards
Meikel
--
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 wi
On Thu, Oct 4, 2012 at 4:28 PM, Stathis Sideris wrote:
> Maybe performance is the reason:
>
> > (time (dotimes [_ 100] (apply mapcat list [[1 2 3] [7 7 7]])))
> "Elapsed time: 1853.904337 msecs"
> > (time (dotimes [_ 100] (interleave [1 2 3] [7 7 7])))
> "Elapsed time: 81.000798 msecs"
>
Maybe performance is the reason:
> (time (dotimes [_ 100] (apply mapcat list [[1 2 3] [7 7 7]])))
"Elapsed time: 1853.904337 msecs"
> (time (dotimes [_ 100] (interleave [1 2 3] [7 7 7])))
"Elapsed time: 81.000798 msecs"
On Wednesday, 3 October 2012 19:21:37 UTC+1, Marc Dzaebel wrote:
>
>
Thanks for the link! I proposed the change there.
Am Mittwoch, 3. Oktober 2012 20:06:42 UTC+2 schrieb Andy Fingerhut:
>
> I don't know the reason for the current implementation rather than your
> suggested one, but at least on the comment about 0 or 1 arguments has a
> ticket for it:
>
> http://
I don't know the reason for the current implementation rather than your
suggested one, but at least on the comment about 0 or 1 arguments has a ticket
for it:
http://dev.clojure.org/jira/browse/CLJ-863
Andy
On Oct 3, 2012, at 11:03 AM, Marc Dzaebel wrote:
> clojure.core/interleave could be im
10 matches
Mail list logo