Hi Daniel,

Ah, then yes! Any relation that includes a conde will be nondeterministic
in the sense described there. This is an important difference between
Racket's cond and miniKanren's conde.  cond will only return 1 answer from
1 of its clauses, and conde will "return" answers from *all* of its
clauses.  Answers then get pruned away as miniKanren encounters
contradictions/conflicts elsewhere.

You can see this in action if you run these different programs. Perhaps the
last one will surprise you.

(run* [q]
      (conde
        [(== q 1)]
        [(== q 2)]
        [(== q 3)]))

(run* [q]
      (conde
        [(== q 1)]
        [(== q 2)]
        [(== q 3)])
      (== q 1))

(run* [q]
      (fresh [x]
             (conde
               [(== x 1)]
               [(== x 2)]
               [(== x 3)]))
      (== q 1))

Thanks!
Jon



On Wed, Jul 5, 2017 at 2:35 PM, Daniel S <[email protected]> wrote:

> hey jon,
>
> thx for the answer...i have to work through it ;)
>
> I meant non-determistic in this sense: https://en.wikipedia.
> org/wiki/Nondeterministic_programming
>
> Because pick-one returns 3 answers, it is non-determistic in that sense i
> think.
>
> If it would always produce one answer it would be determistic as i
> undestand.
>
>
>
> Am Montag, 3. Juli 2017 17:06:01 UTC+2 schrieb Daniel S:
>>
>> Hello,
>>
>> anyone solved the River Crossing Puzzle (https://en.wikipedia.org/wiki
>> /River_crossing_puzzle)
>> with minikanren yet?
>>
>> bye
>>
>> Daniel
>>
>>
>> --
> You received this message because you are subscribed to the Google Groups
> "minikanren" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/minikanren.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"minikanren" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/minikanren.
For more options, visit https://groups.google.com/d/optout.

Reply via email to