Hi Robert

Almost there, you're just using square brackets"[" instead of  parens "(" 

test: "Hi"
== "Hi"
>> bla: "There"
== "There"
>> compose [(test) (bla) bla (test)]
== ["Hi" "There" bla "Hi"]

Without deep
compose [(test) [(bla)] (bla) bla (test)]
== ["Hi" [(bla)] "There" bla "Hi"]
With deep
>> compose/deep [(test) [(bla)] (bla) bla (test)]
== ["Hi" ["There"] "There" bla "Hi"]
>>

Cheers,

Allen K

----- Original Message ----- 
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, November 13, 1999 12:37 AM
Subject: [REBOL] compose??


> Hi, just playing around with 'compose. I thought it would be a cool thing
> to use, to flatten nested blocks into one level. So I tried:
> 
> >> help compose
> Selectively evaluates a block of expressions, only evaluating paren
> expressions and returns the result as a block.
> Arguments:
>     value -- Block to compose
> Refinements:
>     /deep -- Compose within nested blocks
> >> compose [[test bla] bla [test]]
> == [[test bla] bla [test]]
> >> compose/deep [[test bla] bla [test]]
> == [[test bla] bla [test]]
> >>
> 
> ?? For the last I would have expected: [test bla bla test]
> 
> So what's the difference with /deep?
> 
> Robert M. Muench, Karlsruhe, Germany
>     ==> ask for PGP public-key <==
> 
>   When do you want to reboot today?
> 
> Use the free portable GUI Library
> OpenAmulet from http://www.openip.org
> 
> 

Reply via email to