% % stack: value set-value event-name % % look upwards through the task tree selection lineage % "selev " _\ & log)( !event % % find value socket upwards in tree % % default to current selection % _event _\ % % stack: value set-value event-name selected % "sel" log)( "Valued" get { % % for selected node value exists % -1 } { % % no value in selected node, move upwards to find prototype % _\ { Mep._Above "up" log)( dup whole { % % there is a parent node, check for value exists % "sets" log)( _event second "Valued" get _event ^"wh " log)( { % % value exists in ancestor node, this will be prototype % dup !\ true } { % % not in this ancestor % false } ifelse } { % % no more ancestral nodes % true } ifelse % % stack: value set-value node stop-looking % ? } loop } ifelse tuck % % stack: node value set-value % { % % set the value in the current/ancestry socket % leave the prior version on the stack % _event \_ exch _event \! } { % % get the value in the current/ancestry socket % _event _\ "Valued" get { pop _event \_ } { % % use supplied value % } ifelse } ifelse exch negative % % stack: value was-current % % for setting value, resulting value is prior tree node value content % if nothing returned for prior content, can use as prior existence flag %