Hi Andrew,

Thanks for suggesting, but IMHO I think the approach I proposed should be
more robust for multi-type nested structures:

Let's say:

>> c: ["anybody" [test1 [1 [1 2] 2 [1 5]]]]
>> c/"anybody"/test1
** Syntax Error: Invalid path -- c/.
** Where: (line 1) c/"anybody"/test1
>> select-deep c "anybody" 'test1
== [1 [1 2] 2 [1 5]]

But in order to allow this, you have to modify my function's header in :

select-deep: func [
    data [block!]
    arg1 [any-type!]
    arg2 [any-type! unset!]
    arg3 [any-type! unset!]
    arg4 [any-type! unset!]
    arg5 [any-type! unset!]
][...]

Your idea ?

chr==



> -----Original Message-----
> From: Andrew Martin [SMTP:[EMAIL PROTECTED]]
> Sent: vrijdag 2 februari 2001 09:59
> To:   [EMAIL PROTECTED]
> Subject:      [REBOL] Re: [SCRIPT] select/deep
> 
> > ...but there's for sure a more elegant solution to it...
> 
> >> b: [label1 [label2 [label3 [data1 label4 [data2]]]]]
> == [label1 [label2 [label3 [data1 label4 [data2]]]]]
> >> B/label1/label2/label3/label4
> == [data2]
> 
> Andrew Martin
> ICQ: 26227169 http://members.nbci.com/AndrewMartin/
> -><-
> 
> 
> -- 
> To unsubscribe from this list, please send an email to
> [EMAIL PROTECTED] with "unsubscribe" in the 
> subject, without the quotes.
-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.

Reply via email to