View difference between Paste ID: 3P9Qd8P7 and iCTmxAX4
SHOW: | | - or go back to the newest paste.
1-
1+
2
;;character in a string.
3
(defn first-duplicate-char [str-in]
4-
(defn first-duplicate-char [str_in]
4+
 (loop [[h & t] str-in seen #{}]
5-
  	  (loop [list_Rem (seq str_in) set_Seen (set [])]
5+
   (cond
6-
  	  	(print (type list_Rem) " " list_Rem (next list_Rem) "\n")
6+
     (nil? h) nil
7-
  	  	(if (= 0 (count str_in))
7+
     (seen h) h
8-
  	  		nil
8+
     :else (recur t (conj seen h)))))