tags:

views:

20

answers:

2

Let's say I have

list: [system/history system/prompt]

I want to convert to

list-string: ["system/history" "system/prompt"]

This may be an obvious answer but I can't see any :)

Thanks.

+1  A: 

There's many simple ways to do this in Rebol. It's interesting to use parse:

>> list: [system/history system/prompt]
== [system/history system/prompt]
>> parse list [(list-string: copy []) some [set path path! (append list-string mold path)]]                                                                    
== true
>> list-string                                                                  
== ["system/history" "system/prompt"]
Peter W A Wood
+1  A: 

Another way, that updates the existing list block:

list: [system/history system/prompt]
== [system/history system/prompt]

forall list [list/1: mold list/1]

probe list
== ["system/history" "system/prompt"]
Sunanda