何我可以有这种类型的匹配工作。(我正在使用clojure.core.match/match
)。或者是multimethod
唯一的出路。
(let [x "1.2"]
(match [(read-string x)]
[^java.lang.Long l] :long
[^java.lang.Double d] :double
:else :string))
>> :long
谢谢
何我可以有这种类型的匹配工作。(我正在使用clojure.core.match/match
)。或者是multimethod
唯一的出路。
(let [x "1.2"]
(match [(read-string x)]
[^java.lang.Long l] :long
[^java.lang.Double d] :double
:else :string))
>> :long
谢谢