Hi gmassar,

it's not quite as drastic as that.

After removing from the list, do

>> list: head list
== make list! [2 3 4]

Also try:

>> list: make list! [1 2 3 4]
>> at list 2

compare to
>> block: make block! [1 2 3 4]
>> at block 2

Another surprise:
>> list: make list! [1 2 3 4]
>> foreach element list [print element]

Also try
>> foreach element list [print mold element]

forall and forskip work as expected.

Also compare

>> block: make block! [1 2 3 4]
>> partial-block: skip block 2
>> list: make list! [1 2 3 4]
>> partial-list: skip list 2
>> remove block
>> remove list
>> partial-block
>> partial-list

In short, you'll run into surprises if you expect list to behave like a block.
Looks to me like list is not completely implemented in the experimental version
I'm using (0.10.38.4.2) .

[EMAIL PROTECTED] wrote:

> 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?
>

Reply via email to