欢迎!有关如何工作的更多信息,请参见关于页面。
什么是(class =)和(type =)的区别?谢谢!
使用REPL
=> (source type) (defn type "Returns the :type metadata of x, or its Class if none" {:added "1.0" :static true} [x] (or (get (meta x) :type) (class x))) nil => (source class) (defn class "Returns the Class of x" {:added "1.0" :static true} ^Class [^Object x] (if (nil? x) x (. x (getClass)))) nil