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

[REBOL] Propagating refinements

From: sunandadh:aol at: 21-Dec-2001 9:21

A simple question, I hope. Is there any way of passing refinements from one function to another? In the example below, I want to recursively call Flag-Item with the same refinements it was called with. But without that double IF (or an equivalent Either), I don't know how; and this method gets a bit wearisome when there are two or more I want to propagate. flag-item: func [tree-Node [Object!] /Deleted /ReInstated] [ ;; Flags current node and all its descendants ;;as deleted or reInstated Tree-Node/Status: either Reinstated [True] [False] foreach Inner-tree Tree-Node/Inners [ if Deleted [Flag-item/Deleted Inner-Tree] if ReInstated [Flag-item/ReInstated Inner-Tree] ] ] Thanks, Sunanda.