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

[REBOL] Re: to-path and append?

From: AJMartin:orcon at: 24-Aug-2003 10:27

Hi, Tim. You wrote:
> >> append test-more to-path test-this > == [input type name value] ; say what? I expected (hoped for) > ; [input/type/name/value] what have I done wrong? >> help insert
USAGE: INSERT series value /part range /only /dup count DESCRIPTION: Inserts a value into a series and returns the series after the insert. ;...
>> type? test-more
== block!
>> series? test-more
== true 'Append and 'insert simply return the series they were given as the first value. That series value is the block! value referred to by 'test-more. What you want is an empty path! value for the 'series argument to 'append. Something like this:
>> test-more: remove to path! [to] >> test-this: [input type name value]
== [input type name value]
>> append test-more to-path test-this
== input/type/name/value And if you want the result in a block:
>> test-more: remove to path! [to] >> reduce [append test-more to-path test-this]
== [input/type/name/value] I hope that helps! Andrew J Martin ICQ: 26227169 http://www.rebol.it/Valley/ http://valley.orcon.net.nz/ http://Valley.150m.com/