Do something like this not work for you?

(defn foo [p q]
  (sat [p q] (and p q)))
David

On Fri, Dec 23, 2011 at 5:00 PM, Peteris <peteris.er...@gmail.com> wrote:

> That's exactly what I wanted to do. Say, be able to write
>
> (sat '[p q] '(and p q))
>
> and I tried working out a function that does this. I've seen examples
> of functions on logic variables, but in this case
> how could we create fresh logic variables out of these symbols? That
> seems like something we would need to be
> able to feed into the macro at compile-time.
>
> On Dec 23, 11:29 pm, David Nolen <dnolen.li...@gmail.com> wrote:
> > On Fri, Dec 23, 2011 at 4:10 PM, Peteris <peteris.er...@gmail.com>
> wrote:
> > > Hi,
> >
> > > I wrote a simple SAT solver macro on top of core.logic today (code at
> > >http://peteriserins.com/2011/12/23/sat-in-clojure-core-logic.html). Is
> > > it possible to write a similar SAT solver that would accept expression
> > > arguments at runtime (say, a SAT function, but not necessarily).
> >
> > > Regards
> > > --
> > > Peteris Erins
> >
> > You could change sat to take the unevaluated expression and the symbols
> > that represent the variables. Do you have some examples illustrating the
> > kinds of things you would like to do?
> >
> > David
>
> --
> 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 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

Reply via email to