[EMAIL PROTECTED] wrote:

> to-block to-string a

That's exactly the same as load form a, in that case. I'd suggest:

flatten: func [
   block [block!]
   /local result
] [
   result: make block! 100
   foreach element block [
      either block? element [
         insert tail result flatten element
      ] [
         insert tail result element
      ]
   ]
   result
]

>> flatten [ [ cow sheep dog ] [ pony cat [ pig horse [ cabbage] ] ] ]
== [cow sheep dog pony cat pig horse cabbage]

Ciao,
    /Gabriele./
o--------------------) .-^-. (----------------------------------o
| Gabriele Santilli / /_/_\_\ \ Amiga Group Italia --- L'Aquila |
| GIESSE on IRC     \ \-\_/-/ /  http://www.amyresource.it/AGI/ |
o--------------------) `-v-' (----------------------------------o

Reply via email to