On Tue, May 15, 2012 at 1:49 PM, Matthew Flatt <mfl...@cs.utah.edu> wrote: > At Tue, 15 May 2012 06:31:13 -0500, Robby Findler wrote: >> FWIW, the list? check that is inside first and rest caches its result >> in the header information in the cons cells it traverses. > > In other words, `first and `rest' are amortized constant-time, due to > the use of the amortized constant-time `list?'.
Thanks for the extended comment. So, this is another advantage of immutable conses that I had not tought of. Cheers P. ____________________ Racket Users list: http://lists.racket-lang.org/users