Hi, Norman Richards, In the example, "arg" and "goal" were not literal but were meant to be replaced with something appropriate to whatever you are trying to do. Yes, unless you use a projected value, it is equivalent to precomputing it outside the run*. The point was that, although very hacky, there is a way to create a goal which succeeds if, and only if, another goal fails. Having said that, David Nolen's "nafc" constraint sounds much better and I am going to check it out right now.
On Sat, Aug 10, 2013 at 12:05 AM, Norman Richards <o...@nostacktrace.com>wrote: > Sorry - gmail spasm.... > > What I was trying to say is that what I think your code is doing is > running a Clojure expression once and unifying with 0. It's equivalent to > precomputing that outside of the run*: > > (let [result (count (run* [arg] (goal arg))] > (run* [q] > ;; whatever-else-you-were doing > (== 0 result))) > > Now, of course that expression could use some projected value or be > embedded in a goal that gets tested multiple times, but chances are that > the naive uses of that are probably not doing what you really want to do. > > -- > -- > 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 a topic in the > Google Groups "Clojure" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/clojure/hz63yeQfiQE/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > clojure+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- -- 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/groups/opt_out.