Object obj = iter.next();
if (obj instanceof Turtle) {
result.add((Turtle) obj);
} else if (obj instanceof AgentSet) {
AgentSet tempSet = (AgentSet) obj;
if (tempSet.type() != org.nlogo.agent.Turtle.class) {
throw new EngineException(context, this,
I18N.errorsJ().getN("org.nlogo.prim.etc._turtleset.listInputsMustBeTurtleOrTurtleAgentset",
this.displayName(), Dump.logoObject(tempList, true, false), Dump.logoObject(obj, true, false)));
}
for (AgentSet.Iterator iter2 = tempSet.iterator();