On Mon, Mar 26, 2012 at 5:10 PM, Reid Draper <reiddra...@gmail.com> wrote:
> Moving the unification of `c` to the top of the run form worked, thanks. > Any thoughts on these questions, from the bottom of the gist: > > 1. How can I make the list of ingredients and cocktail names a set > instead of a list (or at least a unique list)? > You could write probably a helper relation with != that gives that guarantee. Yet another thing that cKanren offers out of the box - alldiff/fd. > 2. Is there a better way to describe the problem to answer a question > like, "what list of N ingredients makes the most different cocktails?" > Some things are easier to solve in Clojure :) Tag each result with the ingredients list - then use Clojure reduce one the results of run* to determine which sets of ingredients products the most different cocktails. I'm sure there are other solutions - but the beauty of miniKanren is how easily you can switch between paradigms at your convenience. David -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en