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

[REBOL] Re: reduce/deep

From: antonr:iinet:au at: 18-Oct-2003 16:08

You can handle cyclic blocks, that is, blocks with contain themselves at some point. You just maintain a list of visited blocks. If you run into one that has already been visited (in the list already) then don't process it (that would lead to infinite loop). If not already visited, add it to the list and the process it. All the containers could be supported this way; blocks, lists, objects, parens. Anyway, for reduce/deep I suppose you would just do blocks... Anton.