Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: [ Feature request ] move

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?