A+B: Difference between revisions
Content deleted Content added
m Merged Java sections |
|||
Line 974:
3 4
7</lang>
Safely and without reader tricks:
<lang clojure>(let [ints (map #(Integer/parseInt %) (clojure.string/split (read-line) #"\s") )]
(println (reduce + ints)))
3 4
=>7</lang>
or same as above, but without "let":
<lang clojure>(println (reduce + (map #(Integer/parseInt %) (clojure.string/split (read-line) #"\s") )))
3 4
=>7</lang>
=={{header|COBOL}}==
|