clojure-uebungen/Assignment_006/solution/readme.md

10 lines
175 B
Markdown
Raw Normal View History

2024-03-11 10:34:40 +01:00
# Lösung: Multi-Arity-Funktion
2024-03-11 10:32:49 +01:00
2024-03-11 10:39:04 +01:00
2024-03-11 10:41:23 +01:00
```clojure
(defn my-average
2024-03-11 10:39:04 +01:00
([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)))
```