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

forall should have a refinement /then-reset

 [1/4] from: princepawn:lycos at: 29-Aug-2000 8:37

I'm sure you've seen the REBOL idiom: forall line [ ... ] line: head line I would appreciate it if I could type: forall/then-reset line [ ... ]

 [2/4] from: joel::neely::fedex::com at: 29-Aug-2000 12:06

Hmmmm... Reset to what? The position of the series just before the forall loop, or the beginning of the series? -jn- [princepawn--lycos--com] wrote:
> I'm sure you've seen the REBOL idiom: > forall line [
<<quoted lines omitted: 7>>
> Get your FREE Email and Voicemail at Lycos Communications at >
-- ; Joel Neely [joel--neely--fedex--com] 901-263-4460 38017/HKA/9677 REBOL [] print to-string debase/64 decompress #{ 789C0BCE0BAB4A7176CA48CAB53448740FABF474F3720BCC B6F4F574CFC888342AC949CE74B50500E1710C0C24000000}

 [3/4] from: princepawn:lycos at: 29-Aug-2000 10:45

Excellent question that I did not even think about!!! how about these two:
>> forall/then-former ;- put back to state before loop >> forall/then-head ;- put back to head
--- ; run this in your ; <a href=>REBOL</a> Interpreter! terrence-brannon: [ [princepawn--yahoo--com] perl-refugee myth-gamer ] perl-refugee: [ 'loved href perl discovery: (metaperl = rebol) 'hates href perl ] myth-gamer: ; angles makes this a href instead of code! use ur imagination! href: func [U T] [ rejoin [ "a href=" U ">" T "/a" ] ] perl: href "Perl" On Tue, 29 Aug 2000 12:06:01 joel.neely wrote:

 [4/4] from: lmecir:geocities at: 30-Aug-2000 9:11

Hi, what about: forall: func [ "Evaluates a block for every value in a series." [throw] 'word [word!] {Word set to each position in series and changed as a result} body [block!] "Block to evaluate each time" /former /head /local fmr ][ if former [fmr: get word] while [not tail? get word] [ do body set word next get word ] if former [set word fmr] if head [set word head get word] ] Regards Ladislav

  • Quoted lines have been omitted from some messages.
    View the message alone to see the lines that have been omitted