<!DOCTYPE html>
<p>When the `keyBy` method is called, the following steps are taken:</p>

<emu-alg>
  1. Let _C_ be the *this* value.
  1. If IsConstructor(_C_) is *true*
    1. Let _map_ be ? Construct(_C_)
  1. Else,
    1. Throw a *TypeError*.
  1. If _map_ does not have a ~[[MapData]]~ internal slot, throw a *TypeError* exception.
  1. If IsCallable(_callbackfn_) is false, throw a *TypeError* exception.
  1. Let _set_ be ? Get(_map_, "set")
  1. Let _iteratorRecord_ be ? GetIterator(_iterable_).
  1. Re