Function proto_vulcan::relation::rember[][src]

pub fn rember<U, E, G>(
    x: LTerm<U, E>,
    ls: LTerm<U, E>,
    out: LTerm<U, E>
) -> InferredGoal<U, E, G> where
    U: User,
    E: Engine<U>,
    G: AnyGoal<U, E>, 
Expand description

A relation where out is equal to ls with first occurrence of x removed.

Example

extern crate proto_vulcan;
use proto_vulcan::prelude::*;
use proto_vulcan::relation::rember;
fn main() {
    let query = proto_vulcan_query!(|q| {
        rember(2, [1, 2, 3, 2, 4], q)
    });
    assert!(query.run().next().unwrap().q == lterm!([1, 3, 2, 4]));
}