Oldes / Rebol-wishes

Repository for keeping Rebol related wishes out of issues
0 stars 0 forks source link

Wish: implement `remove/key` #20

Closed Oldes closed 3 years ago

Oldes commented 3 years ago

It will help reduce code like:

if pos: find/skip blk key 2 [ remove/part blk 2 ] 

into:

remove/key blk key

It's also required for better compatibility with Red language where it already is (although at this moment it is using just find and not find/skip .. .. 2 as in example above).

Oldes commented 3 years ago

It should be noted, that there is slight difference with Red when used remove/key on block!. I decided to have it like a shortcut to:

head remove/part find/case/skip <series> <value> 2 2

while in Red it is just:

head remove/part find/case <series> <value> 2

Red also allows it to be used on any-string! types, which I does not support.