(defn has-extern?*
([pre externs]
(let [pre (if-some [me (find
(get-in externs '[Window prototype])
(first pre))]
(if-some [tag (-> me first meta :tag)]
(into [tag 'prototype] (next pre))
pre)
pre)]
(has-extern?* pre externs externs)))
([pre externs top]
(cond
(empty? pre) true
:else
(let [x (first pre)
me (find externs x)]
(cond
(not me) false
:else
(let [[x' externs'] me
xmeta (meta x')]
(if (and (= 'Function (:tag xmeta)) (:ctor xmeta))
(or (has-extern?* (into '[prototype] (next pre)) externs' top)
(has-extern?* (next pre) externs' top))
(recur (next pre) externs' top))))))))