Switch constructor
Creates a Switch with the given input and outputs.
The provided objects must not be mutated after being given to the constructor. In particular, changing the outputs map after creating the Switch is an error.
Implementation
const Switch(this.input, this.outputs);