collectMatchResults

private fnArgMap collectMatchResults(Pattern pattern, Pattern[] collected)

Collect the flat pattern defaults and the matched (collected) leaves into the result map.

Shared by both docopt overloads.

Parameters

patternRoot usage pattern after a successful match.
collectedLeaves matched from argv.

Returns

The result map (pattern defaults first, collected values overriding).