The Reasoned Schemer is a book on logic programming written by Daniel P. Friedman, William E. Byrd, and Oleg Kiselyov.
Questions tagged [reasoned-schemer]
10 questions
32
votes
4 answers
conda, condi, conde, condu
I'm reading the Reasoned Schemer.
I have some intuition about how conde works.
However, I can't find a formal definition of what conde/conda/condu/condi do.
I'm aware of https://www.cs.indiana.edu/~webyrd/ but that seems to have examples rather than…
![](../../users/profiles/1383359.webp)
user1383359
- 2,583
- 2
- 22
- 30
7
votes
4 answers
MiniKanren support by Dr Racket
I started studying miniKanren with the book "The Reasoned Schemer - second edition" and the DrRacket scheme environment.
I installed the "faster-minikanren" package, but the first examples of the book with the command run* (for example, (run* q #f))…
![](../../users/profiles/9859394.webp)
Schemer
- 107
- 6
5
votes
2 answers
The Reasoned Schemer : Not understanding Exercise 57
On Exercise (or entry?) 57, I'm just not understanding how the logic flows. The question is that this: given
(define teacupo
(lambda (x)
(conde
((= tea x ) #s)
((= cup x ) #s)
(else #u))))
where '=' is actually the…
![](../../users/profiles/1022967.webp)
mpettis
- 2,468
- 4
- 19
- 29
5
votes
1 answer
Clojure.logic difference with The Reasoned Schemer
I've been working through The Reasoned Schemer (TRS) using Clojure.logic and paying attention to the differences documented here. I reached frame 24 of Chapter 3, where TRS reports that
(run 5 [x]
(lolo '((a b) (c d) . x)))
should produce
'(()
…
![](../../users/profiles/520997.webp)
Reb.Cabin
- 5,063
- 2
- 30
- 53
4
votes
1 answer
Why does 'The Reasoned Schemer' add an 'o' to the end of its functions?
In the reasoned schemer, they name standard lisp functions with an 'o' on the end, eg conso and appendo.
My question is: Why does 'The Reasoned Schemer' add an 'o' to the end of its functions?
![](../../users/profiles/15441.webp)
hawkeye
- 31,052
- 27
- 133
- 271
3
votes
2 answers
Clarify search algorithms in different minikanren implementation
I am currently learning miniKanren by The Reasoned Schemer and Racket.
I have three versions of minikanren implementation:
The Reasoned Schemer, First Edition (MIT Press, 2005). I called it TRS1
https://github.com/miniKanren/TheReasonedSchemer
PS.…
![](../../users/profiles/4518482.webp)
chansey
- 541
- 4
- 10
3
votes
3 answers
miniKanren: How to define #s and #u?
In miniKanren, succeed can be defined as (define succeed (== #t #t)), and fail can be defined as (define fail (=== #t #f)). But what about #s and #u as short forms of succeed and fail, as they appear in The Reasoned Schemer?
(define #s succeed)…
![](../../users/profiles/5916915.webp)
Flux
- 5,866
- 4
- 24
- 62
2
votes
1 answer
Is a "facts database" not a core feature of miniKanren?
I have been playing around with miniKanren, trying to understand it by converting very basic Prolog tutorials into it.
I use Python habitually so I started with the LogPy library, which has since been forked and improved upon as a lib actually…
![](../../users/profiles/202168.webp)
Anentropic
- 26,635
- 9
- 86
- 130
2
votes
1 answer
How to explain run 5 (x) g0 g1 in The Reasoned Schemer
I don't understand how the run n (x) g0 g1 ... to run through listo
the listo is defined like this
(define listo
(lambda (l)
(conde
[(nullo l) #s)]
[(pairo l)
(fresh (d)
(cdro l d)
(listo d))]
[else…
![](../../users/profiles/5187663.webp)
Hualin
- 63
- 6
2
votes
1 answer
Not understanding The Reasoned Schemer Chapter 5 frame 62
I am currently learning miniKanren by learning The Reasoned Schemer.
And I am stuck in an exercise in Chapter 5 frame 62: (run* (x) (flatten_o (a) x)), why there are three lists in output?
![](../../users/profiles/6202853.webp)
Chen Wang
- 515
- 4
- 7