Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
; Read a number from STDIN
; Read that many lines of input from STDIN. Print output to STDOUT
(defn shashank [s]
(- (count s) (count (partition-by identity s))))
(defn -main []
(println "give me a number of lines followed by that
many lines")
(loop [t (Integer/parseInt (read-line))]
(when (pos? t)
(println (str (shashank (read-line))))
(recur (dec t)))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.