[EMAIL PROTECTED] wrote:

> > -----Original Message-----
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, December 09, 1999 3:10 AM
> > To: [EMAIL PROTECTED]
> > Subject: [REBOL] RFF: empty? for blocks Re:
>
> > empty? is kind of confusing, since it's just a synonym for
> > tail? and doesn't really tell you if there are no elements in the block,
> > as there might be some before the index point:
>
> Hi, that's the point (!!) and that's why I don't use empty? blind less with
> blocks.
>
> > You can always use:
> >
> > >> empty? head test-block
> > == false
> >
> > to find out if test-block is really empty.
>
> Well, I would like to avoid this and that's why I would like to see that
> empty? works on the whole block and not in relation to the index point.

Hmm, I am not sure it would be good, as REBOL is full of references.

block: ["A" "B" "C" "D" "E"]
blk: at block 3
["C" "D" "E"]

for me, blk is starting from "C", ending with "E", and it's OK, even empty
should return false ...

What's was more confusing for me is print head blk, it returns ["A" "B" "C" "D"
"E"] and I was pretty nervous about it during my beginnings with REBOL, as we
clearly said blk should point "at block 3". So tail blk should return "E",
while head blk should return "C" imho.

Maybe also possibility to double-index would be nice as it would not require us
to use copy/part :-)

blk: at/double block 3 4
["C" "D"] - result is still just pointing to original block, while it's 'last
element is "D" instead of "E"

The problem is 1) I don't know if it's easy achievable and even if it would
find practical usage for us 2) it's limited to function as 'at e.g., but maybe
even 'next or so could be refined ...

Just my thoughts, you can easily ignore them :-)

Cheers,

-pekr-



>
> Robert

Reply via email to