src/precore/util/Iterables.php
public static function transform(IteratorAggregate $fromIterable, callable $transformer) : IteratorAggregate
    {
        return new CallableIterable(
            function () use ($fromIterable, $transformer) {
                return Iterators::transform(Iterators::from($fromIterable->getIterator()), $transformer);
            }
        );
    }
public static function transform(IteratorAggregate $fromIterable, callable $transformer) : IteratorAggregate
    {
        return new CallableIterable(
            function () use ($fromIterable, $transformer) {
                return Iterators::transform(Iterators::from($fromIterable->getIterator()), $transformer);
            }
        );
    }
Returns an iterable that applies function to each element of fromIterable.

@param IteratorAggregate $fromIterable
@param callable $transformer
@return IteratorAggregate