From 351cca2a131d0370ef68397f89ae93676ebb657a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Fran=C3=A7a?= Date: Thu, 18 Jun 2020 01:47:43 -0300 Subject: [PATCH 1/2] Clojure day one --- src/training_day.clj | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/training_day.clj b/src/training_day.clj index f5ac2e69..c42228cb 100644 --- a/src/training_day.clj +++ b/src/training_day.clj @@ -1,11 +1,13 @@ (ns training-day) -(def answer ":(") +(def answer 42) (def hai "O HAI!") -(defn square [x] - ":(") +(defn + square [x] + ( x * x )) -(defn average [a b] - ":(") +(defn + average [a b] + (/ (+ a b) 2)) From 4dc73466b6bac68332b1d0fe08a1662653d9a65f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Fran=C3=A7a?= Date: Thu, 18 Jun 2020 01:55:27 -0300 Subject: [PATCH 2/2] Clojure day one - correction --- src/training_day.clj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/training_day.clj b/src/training_day.clj index c42228cb..30ad563e 100644 --- a/src/training_day.clj +++ b/src/training_day.clj @@ -6,7 +6,7 @@ (defn square [x] - ( x * x )) + (* x x)) (defn average [a b]