function constFunc(func) {
    func.prototype = null;
    return Object.freeze(func);
  }
Monkey patch operations that would make their argument
non-extensible.

<p>The monkey patched versions throw a TypeError if their
argument is not an object, so it should only be done to functions
that should throw a TypeError anyway if their argument is not an
object.