'John Clements' via Racket Users <racket-users@googlegroups.com> [16-11-01 18:47]: > > > On Nov 1, 2016, at 8:02 AM, David Storrs <david.sto...@gmail.com> wrote: > > > ... > > > Is it possible to jump right into a list at a certain item of > > > the list and to start processing there? > > > > Yes. What you want is list-ref > > > > (define my-list '(a b c d e f g)) > > > > (list-ref (list 'a 'b 'c) 0) > > 'a > > > Oog, no, don’t do that. The earlier solution, by returning the list (or, if > you prefer, “a pointer to the list”), ensure that the entire (resumed) search > takes time linear in the length of the list. But indexing into the list with > ‘list-ref’ will require re-traversing the first part of the list, probably > turning an O(n) operation into an O(n^2) operation. > > Right? > > John > > > > -- > You received this message because you are subscribed to the Google Groups > "Racket Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to racket-users+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. >
Hi John, thanks for your reply! :) My first assumption was, that returning the tail of a list would return a FULL COPY (*>IIIIKKKKS<*) of that tail made me feels not very comfortable about that kind of solution. But... :) If under the hood racket transfers references...NO PROBLEM! I like that! 8) Cheers Meino -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.