I hereby claim:
- I am g7s on github.
- I am g7s (https://keybase.io/g7s) on keybase.
- I have a public key ASCrJVdh453xZQORNELSm5pN1o-Q-tlinjYHOcbOUxWS2Qo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
(defn sum-pair | |
[target nums] | |
(when (pos? (count nums)) | |
(let [min-el (get nums 0) | |
max-el (peek nums)] | |
(case (compare (+ min-el max-el) target) | |
1 (recur target (pop nums)) | |
-1 (recur target (subvec nums 1)) | |
0 [min-el max-el])))) |