substitute

Similar to among but for set of replacements/substitutions substs.

Time-Complexity: O(1) thanks to D's switch guaranteeing O(1).

Meta