hi all, i’m working my way through the reasoned schemer with core.logic; i’ve read https://github.com/clojure/core.logic/wiki/Differences-from-The-Reasoned-Schemer, but i’m still a little confused?
specifically by the use of the non-prefixed cond
, e.g.:
also, i’m not sure how to get conde
to properly evaluate:
(run* [q] (conde [fail succeed] [succeed fail]))
@swizzard The book examples aren’t really great in isolation. I’d have to check my copy of the book when I get home to see the context of this.
But the above is how to run an equivalent core.logic conde
when/why would you use lcons
instead of just list
?
I don’t think I’ve ever used lcons
Probably you’d just use it when trying to do examples from minkanren
@norman that’s kind of what i assumed, but wanted to be sure, thanks 🙂
We (ThreatGRID) have probably one of the only production apps with a signficant core.logic component, so I’m heavily biased towards the practical things
i hope you don’t get annoyed by me asking a bunch more dumb questions, because i’m only on chapter 2 of TRS
That’s 2 more chapters than most 🙂
i have vague dreams of using CLP and maybe rete to build an “is my rpg breakable?” tester
so i figure i need to actually understand logic programming first