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

[REBOL] Re: Perl is to stupid to understand this 1 liner.

From: joel:neely:fedex at: 15-Dec-2001 7:00

Petr Krenzelok wrote:
> > > >>rebol[]c: charset "0123456789" parse/all f: read %memo.txt[some > >>[a: 1 2[3 c "-"]4 c b:(change/part a "####" b) | skip]]print f > >> > > > >Very nice! I find it hard to imagine a shorter solution in > > REBOL. > > > eh, I can't read it right now - what does 1 2 [3 c "-"] 4 c > is doing?
One or two occurrences of (three digits and a hyphen), all followed by four digits. It seems to me that there's a nice process of refactoring/refinement underlying that one: [c c c "-" c c c c] | [c c c "-" c c c "-" c c c c] [3 c "-" 4 c] | [3 c "-" 3 c "-" 4 c] [[3 c "-"] | [3 c "-" 3 c "-"]] 4 c 1 2 [3 c "-"] 4c -jn- -- A one-liner is a joke, not a comment. -- Christopher Hart joel)dot)neely)at)fedex)FIX)PUNCTUATION)dot)com