Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: reduction

From: ryanc:iesco-dms at: 5-Oct-2001 11:43

And arguably slightly more reduction... replacepl: func [str [string!]] [foreach [a b] ["^-12^-" {":"} "^-F7^-" {":"} "^-B8^-" {":"} "^-AT^-" {":"}] [replace str a b]] --Ryan Ryan Cole wrote:
> A tad shorter... > > replacepl: func [str [string!]] [replace replace replace replace str > "^-12^-" "^":^"" "^-F7^-" "^":^" "^-B8^-" "^":^"" "^-AT^-" "^":^""] > > --Ryan > > Lim Hwee Kwang wrote: > > > hi, > > > > i have a function like this: > > > > replacepl: func [str [string!]] [replace str "^-12^-" "^":^"" replace > > str "^-F7^-" "^":^"" replace str "^-B8^-" "^":^"" replace str "^-AT^-" > > "^":^""] > > > > may i know how to reduce it? > > > > thanks. > > > > regards > > hk > > > > -- > > To unsubscribe from this list, please send an email to > > [rebol-request--rebol--com] with "unsubscribe" in the > > subject, without the quotes. > > -- > > Ryan Cole > Programmer Analyst > www.iesco-dms.com > 707-468-5400 > > -- > To unsubscribe from this list, please send an email to > [rebol-request--rebol--com] with "unsubscribe" in the > subject, without the quotes.
-- Ryan Cole Programmer Analyst www.iesco-dms.com 707-468-5400