From 0fb8ef1918b1871e155a751009a2750c804b40a3 Mon Sep 17 00:00:00 2001 From: "Rigoberto L. Perez" Date: Thu, 2 Oct 2025 18:42:42 -0400 Subject: [PATCH 1/3] add fibonacci example for Clojure --- Languages.md | 4 ++++ .../Clojure/clojure_fibonacci.clj | 22 +++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 fibonacci_series/Clojure/clojure_fibonacci.clj diff --git a/Languages.md b/Languages.md index 2ba66bf..0d3a294 100644 --- a/Languages.md +++ b/Languages.md @@ -8,11 +8,14 @@ Hello there!! ## Code already developed in this programming language. +- BASIC - Bash - C - C# - C++ +- Clojure - Dart +- Fortran - Go - Haskell - Java @@ -21,6 +24,7 @@ Hello there!! - Lua - Matlab - Miranda +- Octave - PHP - Powershell Script - Python diff --git a/fibonacci_series/Clojure/clojure_fibonacci.clj b/fibonacci_series/Clojure/clojure_fibonacci.clj new file mode 100644 index 0000000..1e41921 --- /dev/null +++ b/fibonacci_series/Clojure/clojure_fibonacci.clj @@ -0,0 +1,22 @@ +(defn fib + "Prints the first `n` fibonacci numbers. + Example: + user> (fib 8) + 0N 1N 1N 2N 3N 5N 8N 13N ;; => nil" + [n] + (loop [i 0 + f1 0N + f2 1N] + (when (< i n) + (print f1 " ") + (recur (inc i) f2 (+ f1 f2))))) + +;; user> (fib 7) +;; 0 +;; 1 +;; 1 +;; 2 +;; 3 +;; 5 +;; 8 +;; ;; => nil From 46aa6b3178b6adc7c2ae38effa8daaa9a8a591c2 Mon Sep 17 00:00:00 2001 From: "Rigoberto L. Perez" Date: Thu, 2 Oct 2025 18:49:03 -0400 Subject: [PATCH 2/3] =?UTF-8?q?refactor=20=F0=9F=8E=A8:=20remove=20result?= =?UTF-8?q?=20comment=20from=20file?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rigoberto L. Perez --- fibonacci_series/Clojure/clojure_fibonacci.clj | 9 --------- 1 file changed, 9 deletions(-) diff --git a/fibonacci_series/Clojure/clojure_fibonacci.clj b/fibonacci_series/Clojure/clojure_fibonacci.clj index 1e41921..446de6c 100644 --- a/fibonacci_series/Clojure/clojure_fibonacci.clj +++ b/fibonacci_series/Clojure/clojure_fibonacci.clj @@ -11,12 +11,3 @@ (print f1 " ") (recur (inc i) f2 (+ f1 f2))))) -;; user> (fib 7) -;; 0 -;; 1 -;; 1 -;; 2 -;; 3 -;; 5 -;; 8 -;; ;; => nil From 5d2cb0b0280bd1141e61b360859274508d9626f1 Mon Sep 17 00:00:00 2001 From: "Rigoberto L. Perez" Date: Thu, 2 Oct 2025 18:52:40 -0400 Subject: [PATCH 3/3] =?UTF-8?q?docs=20=F0=9F=93=9A:=20add=20username=20to?= =?UTF-8?q?=20the=20contributors=20list?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rigoberto L. Perez --- Contributors.md | 1 + 1 file changed, 1 insertion(+) diff --git a/Contributors.md b/Contributors.md index 30191bc..e497b73 100644 --- a/Contributors.md +++ b/Contributors.md @@ -14,3 +14,4 @@ shravan20 Avatar bettman-latin MrJithi +rlperez