Hard to say, the class cast exception will have more information in it
that could cast light on the issue. You also are using :id in one
variation, and :db/id in the other.

On 04/08/2016 05:46 PM, Daniel Ziltener wrote:
> Hi clj,
> 
> I'm trying to do some simple core.logic stuff. My input is a vector of
> maps, which I turn into a source for core.logic using
> |
> (defn make-datamap-rel [datapile]
>   (fn [q]
>     (fn [a]
>       (to-stream
>        (map #(unify a % q) (flatten datapile))))))
> |
> 
> Now I have written two variants for solving my problem. The first works
> flawlessly:
> |
> (defn-find-cat-and-tag-id [pile cat]
>   (let [datamap-rel (make-datamap-rel pile)]
>     (run*[q]
>         (datamap-rel (partial-map {:id q :category cat}))
>         )))
> |
> 
> The second variant throws the ClassCastException:
> |
> (defn-find-cat-and-tag-id [pile cat]
>   (let [datamap-rel (make-datamap-rel pile)]
>     (run*[q]
>       (fresh [qid]
>         (datamap-rel (partial-map {:db/id qid :category cat}))
>         (==q qid)
>         ))))
> |
> 
> I have no idea why this fails. It just doesn't make any sense. Any ideas?
> 
> Best regards,
> zilti
> 
> -- 
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to clojure+unsubscr...@googlegroups.com
> <mailto:clojure+unsubscr...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.


-- 
And what is good, Phaedrus,
And what is not good—
Need we ask anyone to tell us these things?

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to