Re: Recursive definition in core.logic

2014-09-22 Thread Joshua Ballanco
On Sunday, September 21, 2014 at 21:40, Tassilo Horn wrote: > I think instead of `conde' you can use `conda' here, because when the > first clause succeeds the second one cannot succeed and doesn't need to > Careful with the use of `conde` vs `conda`, as `conda` is an early cut. In other words

Re: Recursive definition in core.logic

2014-09-21 Thread Tassilo Horn
Casper writes: > For me that leads to the question, how do we then define the relationship > 'descendant' (which would be the generalisation of child, grandchild etc)? > > (defn child [x y] > (parent y x)) Ok, so you have a `child' relation already, so this should be easy (but it's not teste

Re: Recursive definition in core.logic

2014-09-21 Thread François Rey
I think this blog post should help: https://kotka.de/blog/2011/10/A_field_trip_into_logic_programming.html The site seems to have an invalid certificate so you may or may not want to proceed, but I just did and all is fine. On 21/09/14 17:07, Casper wrote:

Recursive definition in core.logic

2014-09-21 Thread Casper
I have been looking through core.logic tutorials and while I "get it" I haven't had the big epiphany yet. One thing that keeps nagging me is how to make a relation that isn't "fixed". An example is https://github.com/swannodette/logic-tutorial in which there is defined some relations such as pa