Add Guido's multimethods code for dispatch on types.