This is not the type of goal we like to write, but here's how you can do it
in core.logic:
(defn candidate-received-no-votes [candidate]
(conda
[(vote (lvar) candidate)
fail]
[succeed]))
conda/condu should both work here. It basically says, if there is a vote
for the candidate, only consider that branch of the cond, which fails. I'm
sad to say we've even formalized it in our core.logic support lib:
(defmacro fail-if
"fail if the given goal succeeds, use with extreme caution"
[goal]
`(conda [~goal fail]
[succeed]))
We've never had any success with the nafc goal in core.logic. I'm still
not entirely sure what it's supposed to be doing. It seems to be
introducing constraints. If it works, it certainly doesn't play nice with
pldb.
--
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.