Hi David,
On 21/06/13 14:51, David Nolen wrote:
The problem is the reversing of the list if you want to convert back
to a list. You can avoid this but you have to use a custom mapping
operation, continuation passing style, and a trampoline - it won't be
fast.
Another option is to realize th
The problem is the reversing of the list if you want to convert back to a
list. You can avoid this but you have to use a custom mapping operation,
continuation passing style, and a trampoline - it won't be fast.
Another option is to realize that concrete types simply don't matter. What
you're tryi
On 21/06/13 14:08, Philip Potter wrote:
Your logic here is incorrect. To say "transients == fast, persistents
== slow" is to grossly oversimplify things.
Yes, I am indeed oversimplifying things but that doesn't change the fact
that 'into' will be *slower* for collections that don't have transi
On 21 June 2013 13:37, Jim - FooBar(); wrote:
> Hi all,
>
> what do you guys do when you want to map a fn over a list but you want to
> produce a list as the result (not vector or lazy-seq). What is the fastest
> way of doing this?
>
> My first attempt was this:
>
> (->> (mapv f coll)
> rseq ;;r
On 21/06/13 13:51, Cedric Greevey wrote:
(apply list the-seq) seems to work, but (list* the-seq), oddly, does not.
In most contexts, PersistentLists and seqs are interchangeable. Are
you needing to use the seq as a stack after constructing it in some
manner that produces a seq?
No, my requi
(apply list the-seq) seems to work, but (list* the-seq), oddly, does not.
In most contexts, PersistentLists and seqs are interchangeable. Are you
needing to use the seq as a stack after constructing it in some manner that
produces a seq?
On Fri, Jun 21, 2013 at 8:37 AM, Jim - FooBar(); wrote:
Hi all,
what do you guys do when you want to map a fn over a list but you want
to produce a list as the result (not vector or lazy-seq). What is the
fastest way of doing this?
My first attempt was this:
(->> (mapv f coll)
rseq ;;reverse fast
(into '()))
but I quickly realised that lists