[ Feature request ] move
[1/4] from: Rebolinth:nodep:dds:nl at: 13-Aug-2003 11:20
Its seems not to be native ( i probably missed it again ),
perhpas an option for enhancement?
command: move
moves values between series
Description
move /only /part source destination value
/only { moves as series }
/part { moves to a given length or position }
/deep { moves series values within the block }
(R)egards,
Norman.
--
Conversation/lunch: "How do you Eat your Rebol in the Morning?"
[2/4] from: AJMartin:orcon at: 13-Aug-2003 21:43
Norman wrote:
> Its seems not to be native ( i probably missed it again ),
> perhpas an option for enhancement?
<<quoted lines omitted: 5>>
> /part { moves to a given length or position }
> /deep { moves series values within the block }
Can you give an example or two?
Andrew J Martin
Bored while reading about XML parsers...
ICQ: 26227169
http://www.rebol.it/Valley/
http://valley.orcon.net.nz/
http://Valley.150m.com/
[3/4] from: Rebolinth::nodep::dds::nl at: 13-Aug-2003 12:19
Quoting A J Martin
Hello Andrew,
Well yes ofcaurse, i was building a function that was moving series between
different blocks when i though it might even be quicker having it as a native?
i dont know.. (currenlty im using remove and copy or anyother possible solution,
which is fine with me..)
example like:
a: [ a b c d e f g h ... ]
b: [ 1 2 3 4 5 6 ]
c: [ [ a b ] [ c d ] [ e f ] [ g [ h ] ] ]
d: [ [ 1 2 ] [ 3 4 ] [ 5 6 ] [ 7 [ 8] ] ]
e: [ [now/time] [now/date] [ hello ] ]
f: [ [ "this is a string" ] [ now ] ]
>>move/part a b 3
== [ a b c 1 2 3 4 5 6]
>>move/deep c d 4 1
== [ [ h ] [ 1 2 ] [ 3 4 ] [ 5 6 ] [ 7 [ 8] ] ]
>>move/only e f 2
== [ [13-Aug-2003] [ "this is a string" ] [ now ] ]
and so on...
I think its usefull but its up to RT :-)
(R)egards,
Norman.
->
-> Norman wrote:
-> > Its seems not to be native ( i probably missed it again ),
-> > perhpas an option for enhancement?
-> >
-> > command: move
-> >
-> > moves values between series
-> >
-> > Description
-> > move /only /part source destination value
-> >
-> > /only { moves as series }
-> > /part { moves to a given length or position }
-> > /deep { moves series values within the block }
->
-> Can you give an example or two?
[4/4] from: lmecir:mbox:vol:cz at: 13-Aug-2003 13:05
Hi Norman,
> example like:
a: [ a b c d e f g h ... ]
b: [ 1 2 3 4 5 6 ]
c: [ [ a b ] [ c d ] [ e f ] [ g [ h ] ] ]
d: [ [ 1 2 ] [ 3 4 ] [ 5 6 ] [ 7 [ 8] ] ]
e: [ [now/time] [now/date] [ hello ] ]
f: [ [ "this is a string" ] [ now ] ]
> >>move/part a b 3
> == [ a b c 1 2 3 4 5 6]
insert/part b a 3
> >>move/deep c d 4 1
> == [ [ h ] [ 1 2 ] [ 3 4 ] [ 5 6 ] [ 7 [ 8] ] ]
insert/only d c/4/2
> >>move/only e f 2
> == [ [13-Aug-2003] [ "this is a string" ] [ now ] ]
insert/only f reduce e/2
results are B D and F
-L
Notes
- Quoted lines have been omitted from some messages.
View the message alone to see the lines that have been omitted