swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Using forEach:


From: Darren Schreiber
Subject: Using forEach:
Date: Tue, 7 Sep 1999 00:41:00 -0700


In the first step of the algorithm I am building, I want to instruct all of the agents to do the method findClosest neighbor. Currently, I am using the following:

for (i=0; i<listLength; i++) {
[[availableList atOffset: i] findClosestNeighbor: availableList];
}

I saw this type of construct in an example that Benedikt used.

[availableList forEach: M(findClosestNeighbor: availableList)];

But, I am getting a parse error before ). How can I send the list to the group of agents and instruct them to execute the command?



_____________________________________________

Darren Schreiber
Attorney at Law
Graduate Student
Political Science, UCLA
address@hidden
reply via email to

[Prev in Thread] Current Thread [Next in Thread]