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

From: Danny Yoo (dyoo at hashcollision.org)
Date: Wed Jun 27 13:06:29 EDT 2012

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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20120627/ef6c631a/attachment.html>

Posted on the users mailing list.