clojurePerforming Simple Mathematical Operations


This is how you would add some numbers in Clojure syntax. Since the method occurs as the first argument in the list, we are evaluating the + (or addition) method on the rest of the arguments in the list.


Performing mathematical operations is the basis of manipulating data and working with lists. Therefore, understand how it works is key to progressing in one's understanding of Clojure.

Math Examples

;; returns 3
(+ 1 2) 

;; returns 300
(+ 50 210 40)

;; returns 2
(/ 8 4)