3 ms·
Take a look at https://github.com/clojure/clojure/blob/master/src/clj/clojure/core.clj#L6686 https://github.com/clojure/clojure/blob/master/src/clj/cloju... TL
by eliben 9y ago
Take a look at https://github.com/clojure/clojure/blob/master/src/clj/clojure/core.clj#L6686 https://github.com/clojure/clojure/blob/master/src/clj/cloju...
TL;DR: Clojure supports multi-arity functions (sort of like operator overloading in C++, but overloading for the number of operands, not their types)
When no default value is given, the result of reduce on the first two elements is used.