Re: Translating simple path finding problem from prolog to core.logic

2013-06-30 Thread Craig Ching
Thanks Norman! Not sure how I didn't realize that was happening, but it's working exactly as you describe. Thanks much for your help! Cheers, Craig On Sunday, June 30, 2013 2:40:48 PM UTC-5, Norman Richards wrote: > > Just like the prolog, you are generating an infinite number of solutions. >

Re: Translating simple path finding problem from prolog to core.logic

2013-06-30 Thread Norman Richards
Just like the prolog, you are generating an infinite number of solutions. run* will try and give you all of them. You can use clojure's lazy seq operations (first, take, etc...) or just ask for however many you want: > (run 10 [q] (path2 1 7 q)) ((1 4 3 7) (1 2 4 3 7) (1 4 5 7) (1 2 4