        (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))

              (recur (inc i) (- rem 8)))))))))

(defn network-compare
  "Compare the prefixes of networks left and right, with the same result
semantics as compare.  When stable is true (the default), 0 will only be
returned when the networks are value-identical; when stable is false, 0 will be
returned as long as the networks are identical up to their minimum common
prefix length."
  (^long [left right] (network-compare true left right))
  (^long [stable left right]

    "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))))
