Here is the code:
这是代码:
(defn first-char-of-either [^String a ^String b]
(.substring (or a b) 0 1))
(defn first-char-of-either1 [^String a ^String b]
(.substring ^String (or a b) 0 1))
(time (dorun (repeatedly 1000000 #(first-char-of-either nil "abcde"))))
(time (dorun (repeatedly 1000000 #(first-char-of-either1 nil "abcde"))))
(defn first-char-of