Created
April 16, 2016 06:51
-
-
Save bakyeono/601d1cd2948f6e9aa99d20da34575a67 to your computer and use it in GitHub Desktop.
Read from STDIN, write to STDOUT in Clojure
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; read from STDIN | |
(line-seq (java.io.BufferedReader. *in*)) | |
(map #(Integer/parseInt %) (line-seq (java.io.BufferedReader. *in*))) | |
;; write elements of a sequence, line by line, to STDOUT | |
(doseq [elm result] (print (str elm "\n"))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment