<?xml version="1.0"?>
<!DOCTYPE logtalk SYSTEM "logtalk.dtd">
<?xml-stylesheet type="text/xsl" href="lgtxml.xsl"?>
<logtalk>
<entity>
<name><![CDATA[metap]]></name>
<type>protocol</type>
<compilation>static</compilation>
<comment><![CDATA[Useful meta-predicates protocol.]]></comment>
<authors><![CDATA[Paulo Moura]]></authors>
<version>2</version>
<date>2000/7/24</date>
</entity>
<relations>
</relations>
<predicates>
<public>
<predicate>
<name><![CDATA[apply/2]]></name>
<scope>public</scope>
<compilation>static</compilation>
<mode>
<template><![CDATA[apply(+callable,+list)]]></template>
<solutions>zero_or_more</solutions>
</mode>
<comment><![CDATA[Applies a predicate to list of arguments.]]></comment>
<template><![CDATA[apply(Predicate,List)]]></template>
</predicate>
<predicate>
<name><![CDATA[callable/1]]></name>
<scope>public</scope>
<compilation>static</compilation>
<mode>
<template><![CDATA[callable(@term)]]></template>
<solutions>zero_or_one</solutions>
</mode>
<comment><![CDATA[True if the argument can be called as a goal.]]></comment>
<template><![CDATA[callable(Term)]]></template>
</predicate>
<predicate>
<name><![CDATA[filter/3]]></name>
<scope>public</scope>
<compilation>static</compilation>
<mode>
<template><![CDATA[filter(+callable,+list,-list)]]></template>
<solutions>one</solutions>
</mode>
<comment><![CDATA[Returns a list of all list elements that satisfy a predicate using apply/2.]]></comment>
<template><![CDATA[filter(Predicate,In,Out)]]></template>
</predicate>
<predicate>
<name><![CDATA[map/3]]></name>
<scope>public</scope>
<compilation>static</compilation>
<mode>
<template><![CDATA[map(+callable,?list,?list)]]></template>
<solutions>zero_or_more</solutions>
</mode>
<comment><![CDATA[Maps a predicate over a list of elements using apply/2.]]></comment>
<template><![CDATA[map(Predicate,In,Out)]]></template>
</predicate>
<predicate>
<name><![CDATA[succeeds/2]]></name>
<scope>public</scope>
<compilation>static</compilation>
<mode>
<template><![CDATA[succeeds(+callable,+list)]]></template>
<solutions>zero_or_more</solutions>
</mode>
<comment><![CDATA[True if the predicate succeeds for each list element using apply/2.]]></comment>
<template><![CDATA[succeeds(Predicate,List)]]></template>
</predicate>
</public>
<protected>
</protected>
<private>
</private>
</predicates>
</logtalk>
