Created
August 27, 2024 16:13
-
-
Save dvliman/d01208f7c48b40c44db89905b14bf0cd to your computer and use it in GitHub Desktop.
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 between [from target to] | |
(and (<= from target) (<= target to))) | |
(defn calculate-loan-size | |
[loan-amount] | |
(cond | |
(between 1 loan-amount 10000) :small | |
(between 10001 loan-amount 50000) :modest | |
(between 50001 loan-amount 150000) :large | |
(>= loan-amount 150001) :jumbo)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment