OK, folks, this is my third attempt at posting this email. Please excuse me= if it appears thrice (I doubt that should happen, though).
Hallvard Original message: It will not break, since head head "123" is identical to head "123" i.e. if 'reverse were to do 'head all by itself, performing an extra 'head= on the series won't change anything. I haven't seen _any_ examples of= 'reverse being used _without_ 'head (situations where scrips might actually= break), as Carl pointed out in his post. Then there is the current inconsistency in 'reverse: tuples! and pairs!= (since they are not series!) will not be "empty" after being reversed (see= http://www.rebol.org/cgi-bin/cgiwrap/rebol/ml-display-thread.r?m=3DrmlHGYB)= . And then there are lists! : reverse to-list [1 2 3] =3D=3D make list! [1] head reverse to-list [1 2 3] =3D=3D make list! [3 2 1] index? reverse [1 2 3] ; block =3D=3D 4 index? reverse to-list [1 2 3] ; list =3D=3D 3 An odd difference, if you ask me. Maybe this could be done more logical too,= if 'reverse's behaviour were to change? HY On Thu, 16 Dec 2004 15:29:04 EST [EMAIL PROTECTED] wrote: >Carl: > >I'm not sure if anyone has been annoyed by REVERSE returning > the tail position. I know I have. Everywhere I see REVERSE used > like this: ... head reverse foo. > > >Annoying? Yes.. > >But used? Yes -- quite commonly. > >I've scanned a pile of code and found it on several occasions. > >Typically something like: > >if user-display-option =3D "earliest first" [ > data: head reverse data > ] >foreach item data [ .... ] > >Sadly, all that code would break. > >How about a related word? > >invert: func [item] [head reverse item] > >Sunanda >-- To unsubscribe from the list, just send an email to rebol-request >at rebol.com with unsubscribe as the subject. Pr=E6tera censeo Carthaginem esse delendam -- To unsubscribe from the list, just send an email to rebol-request at rebol.com with unsubscribe as the subject.
