Hi, I just wanted to share my notes while working through “The Reasoned Schemer” (2nd Ed.) with core.logic: https://github.com/formsandlines/reasoned-schemer-notebook Maybe this helps someone who is stuck with the translation from Scheme to Clojure. Of course, I also appreciate any feedback since this is my first logic programming experience.
I myself got a bit wrapped around always/`never` ... I'm curious how/if this can be translated into core.logic
The point about defne is interesting thanks, I was going to use an alternative to core.logic for going back over bits of the reasoned schemer (I've read it but not coded it ) since most of that book uses conde and I didn't know there was an equivalent or a close-to-equivalent
Along the way, I discovered that the defrel macro (as described on page 19, Chapter 1) is not really needed and you can just use regular defn to define the relations. I wonder if there is any difference at all since the output seems to be the same and core.logic also does not have defrel. Maybe this gets cleared up later on in the book?
However, core.logic has defne which works like conde and uses pattern-matching to simplify unification. I always try to rewrite the relations from the book with defne to get a feel for it, because it is really convenient.