By the way, i missed

(run* (x)
      (conde
       ((== x "1"))
       ((== x "2"))
       ((== x "3")))
      (conde
       ((== x "4"))
       ((== x "5"))
       ((== x "6"))))

outputs nothing :P sorry, haha.
I mean

(run* (x y)
      (conde
       ((== x "1"))
       ((== x "2"))
       ((== x "3")))
      (conde
       ((== y "4"))
       ((== y "5"))
       ((== y "6"))))

Which is the cartesian product of conde x and conde y



On Thursday, March 9, 2017 at 6:10:23 AM UTC-3, Cev Ing wrote:
>
> Am Donnerstag, 9. März 2017 06:41:41 UTC+1 schrieb William Byrd:
>>
>>
>> Is this what you want? 
>>
>> (define condeo 
>>   (lambda (ls x) 
>>     (fresh (a d) 
>>       (== `(,a . ,d) ls) 
>>       (conde 
>>         ((== a x)) 
>>         ((condeo d x)))))) 
>>
>> > (run* (q) (condeo '(1 2 3) q)) 
>> (1 2 3) 
>>
>  
> Thanks! Now I understand. I tired to build a list but instead condeo has 
> to make just a claim about a single value per iteration.
>  
>

-- 
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