clojure-uebungen/Assignment_006/solution/readme.md

175 B

Lösung: Multi-Arity-Funktion

(defn my-average
  ([a b]         (/ (+ a b) 2))
  ([a b c d]     (/ (+ a b c d) 4))
  ([a b c d e f] (/ (+ a b c d e f) 6)))