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
(ns user (:require [snitch.core :refer [defn*]])) (def sample-data [{:users [1]} {:users [2]} {:users [3]}]) (defn* repro [input] (mapv (fn [{:keys [users]}] {:status :ok :users (mapv (fn [v] {:id v}) users)}) input)) (repro sample-data). ;; [{:status :ok, :users [#'user/this>]} {:status :ok, :users [#'user/this>]} {:status :ok, :users [#'user/this>]}] this< ;; {:status :ok, :users [#'user/this>]} this> ;; (this 3) repro< ;; (repro [{:users [1]} {:users [2]} {:users [3]}]) ;; This is a problem when callers of repro fn try to process ;; the results. For example we get an error below (->> sample-data repro (mapcat (fn [{ :keys [users]}] users)) (reduce + 0)) ;; Execution error (ClassCastException) at user/eval97881 (form-init8825021676185248856.clj:648). ;; class clojure.lang.Var cannot be cast to class java.lang.Number
The text was updated successfully, but these errors were encountered:
Thanks for reporting this, I'll take a look when I have time. I've noticed this bug before. You're welcome to contribute :)
Sorry, something went wrong.
No branches or pull requests
The text was updated successfully, but these errors were encountered: