Re: Why does this core.logic program never terminate if you ask for too many results?

2019-10-31 Thread Satyam Ramawat
Laurens, Have you tried checking up to what extent it goes? On Thu, Oct 31, 2019 at 9:44 PM Laurens Van Houtven <_...@lvh.io> wrote: > I always need all of them. Figuring out how many that are combinatorially > is surprisingly tricky! > > On Thu, Oct 31, 2019 at 11:33 AM Satyam Ramawat > wrot

Re: Why does this core.logic program never terminate if you ask for too many results?

2019-10-31 Thread Laurens Van Houtven
I always need all of them. Figuring out how many that are combinatorially is surprisingly tricky! On Thu, Oct 31, 2019 at 11:33 AM Satyam Ramawat wrote: > I mean you can limit the answer according to need, by running into loop > until end users value satisfy, will can be either 5,20 or N. so it

Re: Why does this core.logic program never terminate if you ask for too many results?

2019-10-31 Thread Satyam Ramawat
I mean you can limit the answer according to need, by running into loop until end users value satisfy, will can be either 5,20 or N. so it will throw output according to run of a loop. On Thu, 31 Oct 2019 at 4:28 PM, Laurens Van Houtven <_...@lvh.io> wrote: > Satyam: you're suggesting limiting th

Re: Why does this core.logic program never terminate if you ask for too many results?

2019-10-31 Thread Laurens Van Houtven
Satyam: you're suggesting limiting the answers asked from run, or something else? On Thu, Oct 31, 2019 at 11:24 AM Satyam Ramawat wrote: > On a very simple way, you can restrict by using if statement by crossing > checking the count/length of the list, > https://clojuredocs.org/clojure.core/if >

Re: Why does this core.logic program never terminate if you ask for too many results?

2019-10-31 Thread Satyam Ramawat
On a very simple way, you can restrict by using if statement by crossing checking the count/length of the list, https://clojuredocs.org/clojure.core/if On Tuesday, October 29, 2019 at 11:06:54 PM UTC, Laurens Van Houtven wrote: > > Hi, > > I'm trying to divide a list into 3 lists such that (= my

Re: Why does this core.logic program never terminate if you ask for too many results?

2019-10-31 Thread Marc Limotte
At first glance, I'd guess that the empty list is causing your problem. You can always come up with one more path (which may not create a unique solution, but a path to explore) that has one more empty list appended. On Tue, Oct 29, 2019 at 6:06 PM Laurens Van Houtven <_...@lvh.io> wrote: > Hi,