Hi, I am trying to write myself something to generate some test data, and I
thought
clojure.core logic fits the bill ... unfortunately, for some reason, it
doesn't work.
In my project.clj:
[org.clojure/clojure 1.5.0]
[org.clojure/core.logic 0.8.3]
in my namespace:
(ns tests.search
str is a function not a goal/relation - it doesn't know how to deal with
logic vars. If you want that to work you will need to project result first.
But if you project result then order matters and the unification of query
must come after the membero call.
On Thu, Apr 4, 2013 at 9:25 AM, Adam
Thanks, this got me quite far.
But I'd like to create goals with string, for example currently I have no
idea, how would I write a substring goal.
Thanks for any suggestion!
Adam
--
--
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this
There is currently no simple way to make a substring goal beyond
manipulating strings as sequences which is not ideal. The constraint
framework does make it possible, but that API is under change so you can't
build things upon it reliably yet.
So project is your best option for now.
On Thu, Apr