Function proto_vulcan::relation::rest[][src]

pub fn rest<U, E, G>(
    list: LTerm<U, E>,
    rest: LTerm<U, E>
) -> InferredGoal<U, E, G> where
    U: User,
    E: Engine<U>,
    G: AnyGoal<U, E>, 
Expand description

A relation such that rest is list without its first element.

Example

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