function dedupeMixin(mixin) {
  return superClass => {
    if (wasMixinPreviouslyApplied(mixin, superClass)) {
      return superClass;
    }
    const mixedClass = mixin(superClass);
    appliedClassMixins.set(mixedClass, mixin);
    return mixedClass;
  };
}
Apply each mixin in the chain to make sure they are not applied more than once to the final class.
@export
@param {function} mixin      Mixin to be applyed
@returns {object}            Mixed class with mixin applied