[REBOL] Re: Multiple Find Function
From: al:bri:xtra at: 21-Feb-2002 16:12
Alan wrote:
> out: copy/deep reduce [val []]
The above line is better as:
out: reduce [val make block! 2]
Andrew Martin
ICQ: 26227169 http://valley.150m.com/
-><-
----- Original Message -----
From: "alan parman" <[reboler--programmer--net]>
To: <[rebol-list--rebol--com]>
Sent: Thursday, February 21, 2002 1:27 PM
Subject: [REBOL] Re: Multiple Find Function
> Ooops!
>
> I meant
>
> multi-find: func [
> "Find multiple instances of a value in a series and output their index
position"
> ser [series!] "series to search"
> val "value to find"
> /local found out
> ][
> out: copy/deep reduce [val []]
> parse ser [any [thru val found: (append out/2 (index? found) - length?
val)]]
> out
> ]
>
> Notice that there is no "return" anywhere in site ;)
> --
>
> _______________________________________________
> Sign-up for your own FREE Personalized E-mail at Mail.com
> http://www.mail.com/?sr=signup
>
> 1 cent a minute calls anywhere in the U.S.!
>
http://www.getpennytalk.com/cgi-bin/adforward.cgi?p_key=RG9853KJ&url=http://
www.getpennytalk.com