
  -spec register(RegName, PidOrPort) -> true
                    when RegName :: atom(), PidOrPort :: port() | pid().

  Registers the name RegName with a process identifier (pid) or a
  port identifier in the name registry. RegName, which must be
  an atom, can be used instead of the pid or port identifier in send
  operator (RegName ! Message) and most other BIFs that take a pid
  or port identifies as an argument. Example:

    > register(db, Pid).
    true

  The registered name is considered a Directly Visible Erlang
  Resource and is automatically unregistered when the process
  terminates.

  Failures:

  badarg:
    If PidOrPort is not an existing local process or port.

  badarg:
    If RegName is already in use.

  badarg:
    If the process or port is already registered (already has a
    name).

  badarg:
    If RegName is the atom undefined.
