[racket] Is list processing function "last" expensive?

From: Jay McCarthy (jay.mccarthy at gmail.com)
Date: Wed Jun 27 14:21:33 EDT 2012

And there are a lot of other list-like data-structures that make
certain operations better (at the expense, sometimes, of different


On Wed, Jun 27, 2012 at 11:06 AM, Danny Yoo <dyoo at hashcollision.org> wrote:
> On Wednesday, June 27, 2012, Harry Spier wrote:
>> Is the list processing function "last" expensive?  Does it  traverse
>> the entire list to get the value?
> Random access in a linked list is costly, so yes. If you need fast random
> access, vectors and gvectors may be appropriate.
> ____________________
>  Racket Users list:
>  http://lists.racket-lang.org/users

Jay McCarthy <jay at cs.byu.edu>
Assistant Professor / Brigham Young University

"The glory of God is Intelligence" - D&C 93

Posted on the users mailing list.