Created
November 30, 2016 06:18
-
-
Save Archer70/d0a0cb9e327ac7575317e0e1dbbbbb7c to your computer and use it in GitHub Desktop.
Answer to Facebook number question.
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
(def numbers [ | |
[8 2] [5 4] [9 6] | |
[7 5] [20 3] [30 1] | |
[18 4] [10 5] | |
]) | |
(map (fn [pair] | |
(pair 0) "+" (pair 1) | |
"=" | |
(* (pair 0) (pair 1)) | |
(+ (pair 0) (pair 1)) | |
(- (pair 0) (pair 1)) | |
"\n" | |
) | |
) numbers) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment