Created
November 2, 2016 23:30
-
-
Save spirinvladimir/5977097cb43d992f735d061919fca3e5 to your computer and use it in GitHub Desktop.
Array to string with separator for hackerrank
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
(defn a2s [a] | |
(reduce | |
(fn [s n] | |
(str s (str " " n))) | |
(str (first a)) | |
(rest a))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment