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

[REBOL] Re: Propagating refinements

From: lmecir:mbox:vol:cz at: 21-Dec-2001 18:46

Hi Sunanda, have a look at the Apply function that can be found in http://www.sweb.cz/LMecir/highfun.r . ----- Original Message ----- From: <[SunandaDH--aol--com]> To: <[rebol-list--rebol--com]> Sent: Friday, December 21, 2001 3:21 PM Subject: [REBOL] Propagating refinements 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.