Hello! Is there a way to generalize this code?
TYPED: maybe-prepend-name ( res: resource-gadget str: string -- res: resource-gadget str: string added?: boolean ) over res>> name>> [ [ " - " append prepend ] when* ] keep >boolean ; TYPED: maybe-prepend-root ( res: resource-gadget str: string -- res: resource-gadget str: string added?: boolean ) over res>> root>> [ [ " - " append prepend ] when* ] keep >boolean ; The only difference between the two words is in the slot name. ---=====--- Александр ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk