// fType : T -> Void
// argument means that it takes a function "fType"
// that takes one argument of type "T" and returns Void.
public function applyFuncToAll( fType : T -> Void ):Void
{
cur = first;
while (true)
{
//Call bound function on current object in list.
fType( cur.obj );
if (cur.hasNext)
{
cur = cur.next;
}
else
{
break;
}
}
}
No comments:
Post a Comment