Hi Sunil, For a more detailed tutorial on matche, search for "matche" on this page:
https://github.com/frenchy64/Logic-Starter/wiki/Introduction-to-Logic-Programming-with-Clojure Thanks, Ambrose On Sat, Oct 8, 2011 at 10:20 AM, Sunil S Nandihalli < sunil.nandiha...@gmail.com> wrote: > Hi, > I was looking through the core.logic readme file. I notice that the > var-names (symbols) are prefixed with '?' at some locations and they are not > at some other locations. Can somebody help me figure this out. > > Please look at the readme file found at > https://github.com/clojure/core.logic > > (use '[clojure.core.logic minikanren prelude nonrel match]) > (defna findo [x l o] ([_ [[?y :- o] . _] _] (project [x ?y] (== (= x ?y) > true))) ([_ [_ . ?c] _] (findo x ?c o))) > (defn typedo [c x t] (conda ((lvaro x) (findo x c t)) ((matche [c x t] > ([_ [[?x] :>> ?a] [?s :> ?t]] (fresh [l] (conso [?x > :- ?s] c l) (typedo l ?a ?t))) ([_ [:apply ?a ?b] _] > (fresh [s] (typedo c ?a [s :> t]) (typedo c ?b s))))))) > > I tried to look for similar stuff in the core.match libraries but could not.. > > > Thanks, > > Sunil. > > -- > 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