Oh, yes. in-queue would be better than that! I use for/list a bunch too, but for these simple things map is pretty hardwired for me ...
Robby On Tue, Nov 16, 2010 at 4:02 PM, Jon Rafkind <rafk...@cs.utah.edu> wrote: > On 11/16/2010 03:00 PM, Robby Findler wrote: >> On Tue, Nov 16, 2010 at 3:41 PM, Jon Rafkind <rafk...@cs.utah.edu> wrote: >>> On 11/16/2010 02:39 PM, Robby Findler wrote: >>>> I added (but have not pushed, apprently) queue-map. Mind if we keep >>>> that one instead? >>>> >>> Instead of what.. queue->list? I guess you can implement queue->list in >>> terms of queue-map as (queue-map values queue), but I'd rather not write >>> that in user code. >> Yes. I assume that you didn't do a map right after queue->list in >> whatever you were doing? >> >> I added it for debugging purposes, so I was doing (queue-map >> eq-hash-code q) and printing that out. >> > > I was using the list in a for loop. Probably I should have added a new > sequence type, `in-queue', but its non-trivial to get those sorts of > macros working properly. > > (for ([item (queue->list x)]) ...) > > {as a side note, I tend to use for/list instead of map these days :p} > _________________________________________________ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev