If arr is not an array, an error occurs.
The extra argument(s) are optional. ob can also be a file_name. If ob is omitted, this_object() is default.
Since 3.2.1@36, the second arg can also be a mapping. Then only the elements of the array which belong to the map (as keys) will be returned (i.e. map[arr[index]] != 0).
int check_if_idle(object user) { return query_idle(user); }
...
object *idle_users;
idle_users = filter_array(users(), "check_if_idle");
/* equivalent but smaller and faster */
idle_users = filter_array(users(), #'query_idle );
Now idle_users contains all users that have been idle for more
than 1 second.