satisfies?

macrosince v0.0-927 clojure.core/satisfies?Edit
(satisfies? psym x)

Source docstring:
Returns true if x satisfies the protocol
Source code @ clojurescript:src/main/clojure/cljs/core.cljc
(core/defmacro satisfies?
  [psym x]
  (core/let [p          (:name
                          (cljs.analyzer/resolve-var
                            (dissoc &env :locals) psym))
             prefix     (protocol-prefix p)
             xsym       (bool-expr (gensym))
             [part bit] (fast-path-protocols p)
             msym       (symbol
                          (core/str "-cljs$lang$protocol_mask$partition" part "$"))]
    (core/if-not (core/symbol? x)
      `(let [~xsym ~x]
         (if-not (nil? ~xsym)
           (if (or ~(if bit `(unsafe-bit-and (. ~xsym ~msym) ~bit) false)
                    (identical? cljs.core/PROTOCOL_SENTINEL
                      (. ~xsym ~(with-meta (symbol (core/str "-" prefix)) {:protocol-prop true}))))
             true
             (if (coercive-not (. ~xsym ~msym))
               (cljs.core/native-satisfies? ~psym ~xsym)
               false))
           (cljs.core/native-satisfies? ~psym ~xsym)))
      `(if-not (nil? ~x)
         (if (or ~(if bit `(unsafe-bit-and (. ~x ~msym) ~bit) false)
                  (identical? cljs.core/PROTOCOL_SENTINEL
                    (. ~x ~(with-meta (symbol (core/str "-" prefix)) {:protocol-prop true}))))
           true
           (if (coercive-not (. ~x ~msym))
             (cljs.core/native-satisfies? ~psym ~x)
             false))
         (cljs.core/native-satisfies? ~psym ~x)))))