struct

Kanren::State(T)

Inherits Struct < Value < Object

Constructors

new

Instance methods

[](var) : T

Return the value bound to the given Var, or raise KeyError if unbound.

[]?(var) : T | Nil

Return the value bound to the given Var, or nil if unbound.

bindings
bindings=(bindings : Immutable::Map(Kanren::Var, T))
is_bound?(var) : Bool

Return true if the given Var is bound to a value in this State.

redirects
redirects=(redirects : Immutable::Map(Kanren::Var, Kanren::Var))
unify_value(var : Var, value : T) : Iterator(State(T))

Return the stream of states in which the given Var has been unified with the given value. If this is logically inconsistent with the current state, the returned stream of states will be empty.

unify_values(a_value : T, b_value : T) : Iterator(State(T))

Return the stream of states in which the given two values are unified (constrained to be the same value). If the values are not equal, the returned stream of states will be empty.

unify_vars(a : Var, b : Var) : Iterator(State(T))

Return the stream of states in which the given two Vars are unified (constrained to have the same value). If this is logically inconsistent with the current state, the returned stream of states will be empty.