mux function Null safety

Logic mux(
  1. Logic control,
  2. Logic d1,
  3. Logic d0
)

Performs a multiplexer/ternary operation.

This is equivalent to something like:

control ? d1 : d0

Implementation

Logic mux(Logic control, Logic d1, Logic d0) => Mux(control, d1, d0).out;