On Thu, Oct 25, 2012 at 3:10 PM, Jordan Lewis <[email protected]>wrote:
> Hi, > > I'm new to core.logic and logic programming in general. I tried to write a > small program to generate all permutations of any size for an input list > with unique elements. To start, I hardcoded the input list to be (range 3). > Here's what I came up with: > Are you using core.logic 0.8.0-beta1 ? The distincto issue looks like it might be a bug. As far as not terminating that's because of the structure of the program. By asking for the 17th solution you asking to construct lists larger than 3 which satisfy the distincto condition which is of course impossible. The program fails indefinitely because q has no bound. David -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to [email protected] Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/clojure?hl=en
