Last active
April 30, 2017 13:57
-
-
Save deque-blog/aba40dbee93c991b1f5a53bb9cde6925 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 absolute-value | |
[x] | |
(if (< x 0) ;; Condition | |
(* -1 x) ;; Consequence | |
x)) ;; Alternative | |
(absolute-value -1) | |
=> 1 | |
(absolute-value 1) | |
=> 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment