I followed Elan's suggestion to try out list! series. Here is what I
did:

>> list: make list! [1 2 3 4]
== make list! [1 2 3 4]
>> first list
== 1
>> remove list
== make list! [2 3 4]
>> first list
** Script Error: Out of range or past end.
** Where: first list

What!!!

>> list
== make list! []
 
Oh, the series is completely empty!

Can anybody explain why remove all elements in the list instead of just
the first element? Remove block! series just one element at the head.
Why different?

[EMAIL PROTECTED] wrote:
> 
> Hi Sharriff,
> 
> 1. Thanks for the link to the SocketServer site.  Interesting stuff.
> 2.Theoretically (I haven't actually timed it)
> LIST! is faster when it comes to adding and removing elements. If you have a
> lot of add/remove operations on a series than a value of type list! should be
> faster.
> HASH! is faster when it comes to looking up elements. If you need to speed up
> searches then HASH! should be much faster. I expect that the speed of looking
> up elements in hashes is offset by the time it initially takes to construct a
> hash! and to add and remove elements in a hash.
> Be careful when navigating in list series. Indeces do not work the same way
> they do in blocks. Try out these examples:
> >> list: make list! [1 2 3 4]
> >> block: make block! [1 2 3 4]
> >> first block
> >> first list
> >> remove block
> >> remove list
> >> first block
> >> first list
> 
> [EMAIL PROTECTED] wrote:
> 
> > It�s stated somewhere that HASH! and LIST! types are better for data
> > retieval, by what factor and why exactly? are there any special sort or
> > retieve commands or functions that are not documented? I habe�nt found any
> > I�m using Blocks to try to implement a user list of 40-50 users.
> >
> > Sharriff Aina
> > med.iq information & quality in healthcare AG

Reply via email to