Clojure (3) prefix notation

we are used to using 3 + 5 if we add two numbers
Clojure is different from what we are familiar with.

(+ 2 3) this is clojure add form.

if we add numbers not only two, code will be complicated
ex)  add(add(add(2, 3),5),6)

clojure is so simple
(+ 2 3 5 6)

and result is the same


Popular posts from this blog

Project euler 169 found clue

Floyd-Warshall's algorithm