Initial commit

This commit is contained in:
Folkert Kevelam 2025-03-30 18:57:54 +02:00
parent 83561bfec1
commit dc0dd132b8

17
SICP/exercise_1_3.janet Normal file
View File

@ -0,0 +1,17 @@
(defn max [a b]
(if (> a b) a b))
(defn min [a b]
(if (> a b) b a))
(defn square [a]
(* a a))
(defn sum-of-squares [a b c]
(-
(+ (square a) (square b) (square c))
(square (min a (min b c)))))
(print (sum-of-squares 1 2 3))
(print (sum-of-squares 3 1 2))
(print (sum-of-squares 2 3 1))