We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I keep getting the exception, "clojure.lang.ArityException: Wrong number of args (0) passed to: core//"
I've isolated it to the second recur line. Is this a bug? Thanks.
(ns group-a-sequence) (defn my-group-by [f s] (loop [x (rest s) acc {(f (first s)) [(first s)]}] (if (not (empty? x)) (if (not (nil? (get acc (f (first x))))) (recur (rest x) (assoc acc (f (first x)) (conj (get acc (f (first x))) (first x)))) ;********************* (recur (rest x) acc)) ; clojure.lang.ArityException: Wrong number of args (0) passed to: core// ;********************* ;(recur (rest x) (assoc acc (f (first x)) [(first x)]))) ;acc))) 3))) (def s [[1 2] [2 4] [4 6] [3 6]]) (def f #(apply / %)) (my-group-by f s)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I keep getting the exception, "clojure.lang.ArityException: Wrong number of args (0) passed to: core//"
I've isolated it to the second recur line. Is this a bug? Thanks.
The text was updated successfully, but these errors were encountered: