Skip to content

members

Syntax

members(<group>,<group>,..., <group>)

Parameters

<group>
One or more group names to be checked.

Returns

A list of any agents who share one or more of the Groups with the calling agent, including the calling agent itself.

Description

Returns a list of all agents who share one or more of the Groups with the calling agent, including the calling agent itself.

Examples

The following returns a list of all the agents who are in the agent's Household or Classroom, or both. Each agent appears at most once in the resulting list. The result is sorted by agent ID numbers.

new_list = members(Household, Classroom)

The following returns a list of all of the agents who are in the agent's Household

new_list = members(Household)

See Also