Supported Versions: PHP 4 >= 4.0.6, PHP 5, PHP 7, PHP 8
Applies the callback to the elements of the given arrays
<?php array_map(?callable $callback, array $array, array ...$arrays): array
<?php     public function map(callable $f): self

    {

        return new static(array_map($f, $this->items));

    }



    public function flatMap(callable $f): self
<?php     public function flatMap(callable $f): self

    {

        return new static(array_merge(...array_map($f, $this->items)));

    }



    public function reduce(callable $f, $initial = null)
<?php     public function zip(Collection $that)

    {

        return new static(

            array_map(null, $this->items, $that->items)

        );

    }

}