- (run* (x) goal0 goal ...)syntax
Primary interface operator for miniKanren. run* instantiates a fresh variable x, and runs through each subsequent goal provided. It returns a list of all possible unifications of x where goals goal0, goal, and so on succeed.
Note: As long as there are a finite number of possible values that can be unified with x, then run* is guaranteed to terminate. However, this importantly doesn't make two guarantees:
- The speed at which the answers will be found. The runtime is generally fast, but miniKanren, and more generally relational and logic programming necessarily requires one to think about the best way to prune the search space of possible answers.
- The order of answers in x that satisfy the goals.