Hi, just to diversify,
here's my try ...
REBOL [
Title: "Test for refinement propagation"
]
a: func [ /c "do c" /d "do d" /e "do e" /local x y ] [
either any [ c d e ] [
if c [print "C"]
if d [print "D"]
if e [print "E"]
] [
print "No refinement"
]
exit
]
; get refinements directly from the function to be called
b: function head clear find copy third :a /local [call ref] [
call: copy [a]
foreach ref first :a [
if refinement? ref [
if not none? get bind to-word ref 'call [ append call to-word ref ]
]
]
do mold to-path call
]
b
b/a
b/c/d
halt ; --------- end of script --------
regards,
Ingo
-- _ . _
ingo@)|_ /| _| _ <We ARE all ONE www._|_o _ _ ._ _
www./_|_) |o(_|(/_ We ARE all FREE> ingo@| |(_|o(_)| (_|
http://www.2b1.de/Rebol/ ._| ._|