Created
July 24, 2014 23:18
-
-
Save aamedina/49b4f8caf28c8b78c26b 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
(def g | |
(fn* | |
([xs acc] | |
(if (let* | |
[or__3975__auto__ (nil? xs)] | |
(if or__3975__auto__ or__3975__auto__ (sequential? xs))) | |
nil | |
(do | |
(throw | |
(new | |
java.lang.AssertionError | |
(str | |
"Assert failed: " | |
(pr-str | |
'(let* | |
[or__3975__auto__ (nil? xs)] | |
(if or__3975__auto__ | |
or__3975__auto__ | |
(sequential? xs))))))))) | |
(if (number? acc) | |
nil | |
(do | |
(throw | |
(new | |
java.lang.AssertionError | |
(str "Assert failed: " (pr-str '(number? acc))))))) | |
(let* | |
[% (if (nil? xs) acc (recur (next xs) (+ (first xs) acc)))] | |
(if number? | |
nil | |
(do | |
(throw | |
(new | |
java.lang.AssertionError | |
(str "Assert failed: " (pr-str 'number?)))))) | |
%)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment