Perhaps this needs to be in a (sub)category of its own.
You know the feeling that you want to do something that looks really simple but how to do this in Rebol/Ren-C
Case:
A. Transforming the content of a block into a string
B. Transforming the content of a string to become a block
First try:
A.
>> blk: [What becomes of a block when turned into a {} value?]
== [What becomes of a block when turned into a "" value?]
>> mold blk
== {[What becomes of a block when turned into a "" value?]}
B.
>> txt: "What becomes of a string when turned into a [] value?"
== {What becomes of a string when turned into a [] value?}
>> to block! txt
== [{What becomes of a string when turned into a [] value?}]
So clearly not what was intended!
After some tinkering:
A.
block-to-text: function [blk [block!]][
result: copy ""
spacer: copy ""
for-each b blk [
append append result spacer mold b
spacer: copy " "
]
result
]
block-to-text blk
== {What becomes of a block when turned into a "" value?}
B.
>> blk: load append append "[" txt "]"
== [What becomes of a string when turned into a [] value?]
To be improved?