Re: Hierarchical data core.logic

2014-11-13 Thread David Nolen
Ah sorry I miss read. Not currently supported, it's a requested feature from Prolog that I haven't gotten around to implementing. David On Thu, Nov 13, 2014 at 12:53 PM, Daniel Stone wrote: > I'm not sure I fully understand, I guess I'm looking for the equivalent to a > sub query? When I tried t

Re: Hierarchical data core.logic

2014-11-13 Thread Daniel Stone
I'm not sure I fully understand, I guess I'm looking for the equivalent to a sub query? When I tried to implement this early, I naively perhaps tried something like this: (defn bars-for-foo [?foo ?bars] (l/== ?bars (l/run* [?q] (fooz ?foo ?q This seems relevant: http://dev.cloju

Re: Hierarchical data core.logic

2014-11-13 Thread David Nolen
There's no need to define the reverse relation - fooz can do it. Just supply bar and leave the foo fresh. David On Thu, Nov 13, 2014 at 12:26 PM, wrote: > I think this is a dummy question, but wondering whether this is possible in > core.logic? > > Lets say I have a set of relations > > (db-rel

Hierarchical data core.logic

2014-11-13 Thread dan . stone16321
I think this is a dummy question, but wondering whether this is possible in core.logic? Lets say I have a set of relations (db-rel foo p) (db-rel bar p) (db-rel fooz p p2) and facts [foo 1] [bar 2] [fooz 2 1] [bar 3] [fooz 3 1] See that the fooz relation is potentially describing bar as chil