chickadee » mini-kanren » fresh

(fresh (a ...) goal0 goal ...)syntax

Creates a logic variable bound to each of the symbol(s) (a ...). These logic variables are then lexically scoped within this macro, whereupon each of the subsequent goals can be evaluated.

Example:

(run* (q)
  (fresh (a d)
    (== a 1)
    (nullo d)
    (conso a d q)))
; => ((1))