Here it's the simple function in clojure using map
(map + [1 2 3] [4 5 6] [7 8 9])
then it returns
=> [12 15 18]
It's nice an simple ;-)
viernes, 28 de agosto de 2015
miércoles, 12 de agosto de 2015
My first function in clojure
This a simple recursive countdown, but in clojure is more interesting. This is the code:
(defn countdown [x] (if (zero? x) (do :blastoff! (println "Zero") ) (do (println x) (recur (dec x)) ) ) )
Suscribirse a:
Entradas (Atom)