Scans args for an argument named argName (default 'envir'), or - when
positionalFallbackIndex is given - for the arg at that positional index when
no named match is found. When the resolved argument is a symbol that resolves
to a variable with a tracked InGraphIdentifierDefinition#envState,
returns the resolved context; otherwise returns undefined.
Named matching uses pmatch semantics: pass allParamNames (the full formal parameter
list) so ambiguous prefixes are rejected. Defaults to [argName], which allows
prefix matches for argName only.
When multiple formals must be matched simultaneously (e.g. data and expr in with),
use bindArgs + resolveArgToEnvir instead so named binding is consistent.
Scans
argsfor an argument namedargName(default'envir'), or - whenpositionalFallbackIndexis given - for the arg at that positional index when no named match is found. When the resolved argument is a symbol that resolves to a variable with a tracked InGraphIdentifierDefinition#envState, returns the resolved context; otherwise returnsundefined.Named matching uses pmatch semantics: pass
allParamNames(the full formal parameter list) so ambiguous prefixes are rejected. Defaults to[argName], which allows prefix matches forargNameonly.When multiple formals must be matched simultaneously (e.g.
dataandexprinwith), use bindArgs + resolveArgToEnvir instead so named binding is consistent.