I have following code:
function f() {
//...do stuff with arguments
//and return something...
}
f(root,
f(child1),
f(child2,
f(subchild1),
....
),
);
I want to know when the root level of 'f' is called, so I introduce a flag as an argument:
f(root, '-r',
f(child1),
f(child2),
//...
)
My question is: Is there a way to know when 'f' is called on the top level "f(root,...)" without adding additional arguments?