Oh, and extra, extra bonus points for anyone who has good ideas about
making constraints polymorphic so we can avoid creating a new namespace for
every X in CLP(X).

David


On Fri, Dec 14, 2012 at 8:02 PM, David Nolen <dnolen.li...@gmail.com> wrote:

> Oh to answer your question - expecting two separate unifications to
> "change" a var defeats the spirit of logic programming - you're back to
> something stateful.
>
> That said the framework is probably laid well enough to implement
> CLP(Map). I don't have any time to do such a thing but I can explain how it
> can be done and I encourage it - with the qualification that the CLP
> framework will be considered alpha status even when 0.8.0 actually goes out
> the door. It will take at least until 0.9.0 if not longer to shake out all
> the issues and really nail the necessary protocols and supporting
> infrastructure.
>
> You could imagine something like `map/mergec`
>
> (map/mergec q {:foo foo} q')
> (map/mergec q' {:bar foo} q'')
>
> David
>
>
> On Fri, Dec 14, 2012 at 6:29 PM, Timothy Baldridge 
> <tbaldri...@gmail.com>wrote:
>
>> I'd think that with this code (== z q) but it fails to resolve:
>>
>> (run 1 [q]
>>
>>
>>
>>      (fresh [foo bar z]
>>
>>
>>
>>             (== z {:foo 42 :bar 43})
>>
>>
>>
>>             (== z (partial-map {:foo foo}))
>>
>>
>>
>>             (== z (partial-map {:bar bar}))
>>
>>
>>
>>             (== q (partial-map {:foo foo}))
>>
>>
>>
>>             (== q (partial-map {:bar bar}))))
>>
>>
>>
>>
>> ()
>>
>> What would be the way to get q to be both foo and bar together? In my
>> application the last two lines are executed in different functions, so
>> simply saying (== q {:foo foo :bar bar}) doesn't really work.
>>
>> Timothy
>>
>> --
>> 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
>
>
>

-- 
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

Reply via email to