PYTHON iterator_apply

(1)
Python replacement for PHP's iterator_apply [ edit ]



Do you know a Python replacement for PHP's iterator_apply ? Write it!

PHP iterator_apply

PHP original manual for iterator_apply [ show | php.net ]

iterator_apply

(PHP 5 >= 5.1.0)

iterator_applyApply a user function to every element of an iterator

Description

int iterator_apply ( Traversable $iterator , callback $function [, array $args ] )

Calls a function for every element in an iterator.

Parameters

iterator

The class to walk through.

function

The callback function to call on every element.

args

Arguments to pass to the callback function.

Return Values

Returns the iteration count.

See Also

  • array_walk() - Apply a user function to every member of an array