[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: LOGO-L> *FAST* Shuffling & Dealing



"Tom Lynn" <thl22@cam.ac.uk> writes:
>Your solution reminded me that item and setitem were two more commands
>which avoid needing a recursion as well as member and .setbf which I
>mentioned in my last posting.  Are there any others?

I don't think that's the main point.  The key is that using an array
instead of a list make ITEM and SETITEM constant-time operations
instead of O(N) ones.  (That is, finding the 100th element of an array
takes no longer than finding the first element, which is not true for
lists whether it's a primitive or an interpreted procedure doing
the work.)


---------------------------------------------------------------
Please post messages to the Logo forum to logo-l@gsn.org.  Mail
questions about the list administration to logofdn@gsn.org.  To
unsubscribe send    unsubscribe logo-l    to majordomo@gsn.org.



Global SchoolNet Foundation - Linking Kids Around the World!
Copyright GSN - All Rights Reserved - Comments & Questions
Visit GSN's Global Schoolhouse for more exciting learning resources!
Search our Site - Home