Skip to content

remove_payload

Tushar Semwal edited this page Oct 15, 2017 · 2 revisions

Syntax:

remove_payload(Agent_name, RemovePredList)  % Removes all clauses for the predicates specified in the RemovePredList.

Agent_name: <atom + > RemovePredList: <atom list +>

Description:

This predicate is used to remove the payload associated with the agent named Agent_name. The RemovePredList is the list of payload predicates which are to be removed. The structure of RemovePredList the same as specified in PredList of the add_payload predicate.

Example:

?- remove_payload(myagent,[(square_coordinate,2),(point,1)]).

In a generalized way, we can define the remove_payload predicate as follows: remove_payload(Agent_name, [(<predicate1>,<Arity>), …]).

Clone this wiki locally