        (network-compare* stable length left right))))
 
 (defn network-contains?
-  "Determine if network contains the address/network addr."
+  "Determine if network `net` contains the address/network `addr`."
   ([net addr]
      (let [length (network-length net)]
        (and (<= length (network-length addr))

    "The length in bits of the network prefix."))

(defn address?
  "Determine if addr is a value which represents an IP address."
  [addr] (and (satisfies? IPAddressOperations addr)
              (boolean (address?* addr))))

(defn network?
  "Determine if net is a value which represents an IP network."
  ([net]
     (and (satisfies? IPNetworkOperations net)
          (boolean (network?* net))))

  (throw (IPNetworkException. ^String (apply format msg args))))

(defn- network-compare*
  "Private version of network-compare.  The value of `length` must be the
minimum common prefix length of the two networks."
  ^long [stable ^long length left right]
  (let [^bytes prefix1 (address-bytes left),
        ^bytes prefix2 (address-bytes right),
        len1 (alength prefix1), len2 (alength prefix2)]
