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

[REBOL] Re: Clunky-looking code

From: rgombert:essentiel at: 7-Apr-2001 16:56

Not too difficult... the function take 2 blocs of numbers, say [2 3 4] and [3 4 5 6], and return the sum of the corresponding terms in each bloc, i.e. : 2*3 + 3*4 +4*5 + (0)*6 the code : repeat i min length? Block1 length? Block2 [...] is used to loop i from 1 to the size of the smaller block, and then : Block1/:i is similar to "pick Bloc1 i", and so is looped as Bloc1/1 when i=1, Block1/2 when i=2 and so on... Hope that answer to your question ;-) Renaud