Skip to content

Instantly share code, notes, and snippets.

@dvliman
Created August 27, 2024 16:13
Show Gist options
  • Save dvliman/d01208f7c48b40c44db89905b14bf0cd to your computer and use it in GitHub Desktop.
Save dvliman/d01208f7c48b40c44db89905b14bf0cd to your computer and use it in GitHub Desktop.
(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