Skip to main content

PrologMetaPredicates

Struct PrologMetaPredicates 

Source
pub struct PrologMetaPredicates;
Expand description

Standard higher-order predicates in Prolog.

Implementations§

Source§

impl PrologMetaPredicates

Source

pub fn maplist(goal: PrologTerm, list: PrologTerm) -> PrologTerm

A maplist/2 call: maplist(Goal, List).

Source

pub fn maplist2( goal: PrologTerm, list: PrologTerm, result: PrologTerm, ) -> PrologTerm

A maplist/3 call: maplist(Goal, List, Result).

Source

pub fn include( goal: PrologTerm, list: PrologTerm, result: PrologTerm, ) -> PrologTerm

An include/3 call.

Source

pub fn exclude( goal: PrologTerm, list: PrologTerm, result: PrologTerm, ) -> PrologTerm

An exclude/3 call.

Source

pub fn foldl( goal: PrologTerm, list: PrologTerm, v0: PrologTerm, v: PrologTerm, ) -> PrologTerm

A foldl/4 call.

Source

pub fn aggregate_all( template: PrologTerm, goal: PrologTerm, result: PrologTerm, ) -> PrologTerm

An aggregate_all/3 call.

Source

pub fn call_n(f: PrologTerm, args: Vec<PrologTerm>) -> PrologTerm

A call/N call.

Source

pub fn once(goal: PrologTerm) -> PrologTerm

A once/1 call.

Source

pub fn ignore(goal: PrologTerm) -> PrologTerm

An ignore/1 call (succeeds even if goal fails).

Source

pub fn forall(cond: PrologTerm, action: PrologTerm) -> PrologTerm

A forall/2 call: forall(Cond, Action).

Source

pub fn findall( template: PrologTerm, goal: PrologTerm, bag: PrologTerm, ) -> PrologTerm

A findall/3 call.

Source

pub fn bagof( template: PrologTerm, goal: PrologTerm, bag: PrologTerm, ) -> PrologTerm

A bagof/3 call.

Source

pub fn setof( template: PrologTerm, goal: PrologTerm, bag: PrologTerm, ) -> PrologTerm

A setof/3 call.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.