Trait ukanren::Goal [−][src]
pub trait Goal {
type Iter: Iterator<Item = State>;
fn apply(&self, s: &State) -> Self::Iter;
fn and<G, I>(self, other: G) -> And<Self, G>
where
Self: Sized,
G: Goal<Iter = I>,
I: Iterator<Item = State>,
{ ... }
fn or<G, I>(self, other: G) -> Or<Self, G>
where
Self: Sized,
G: Goal<Iter = I>,
I: Iterator<Item = State>,
{ ... }
fn boxed(self) -> BoxedGoal<Self::Iter>
where
Self: Sized + 'static,
{ ... }
fn run(&self, k: usize) -> RunStream<Self::Iter>ⓘ { ... }
}
Expand description
A goal that can be executed by the relational system.
Associated Types
Required methods
Provided methods
Take the conjunction of this goal with another.
Take the disjunction of this goal with another.
Box this goal, which simplifies types at the expense of performance.
Evaluate this goal on an empty state, returning a stream of results.
These results contain normalized forms of the first k
variables, to
avoid including auxiliary data that is not relevant to us.