Created
April 9, 2025 05:41
-
-
Save sogaiu/15cb89d1f9505580e9f96b63d7ec9ccb to your computer and use it in GitHub Desktop.
on calling something a hack...
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn int-product | |
[x y] | |
(defn helper | |
[counter total] | |
(if (zero? counter) | |
total | |
(helper (dec counter) (+ total y)))) | |
# | |
(helper x 0)) | |
(comment | |
(int-product 2 3) | |
# => | |
6 | |
) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment