src/Collection/ImmArray.php
public function map(callable $cb)
    {
        $count = count($this);
        $sfa = new SplFixedArray($count);
        for ($i = 0; $i < $count; $i++) {
            $sfa[$i] = $cb($this->sfa[$i], $i, $this);
        }
        return new static($sfa);
    }
public function map(callable $cb)
    {
        $count = count($this);
        $sfa = new SplFixedArray($count);
        for ($i = 0; $i < $count; $i++) {
            $sfa[$i] = $cb($this->sfa[$i], $i, $this);
        }
        return new static($sfa);
    }
public function map ( callable $ cb ) { $ count = count ( $ this ) ; $ sfa = new SplFixedArray ( $ count ) ; for ( $ i = 0 ; $ i < $ count ; $ i ++ ) { $ sfa [ $ i ] = $ cb ( $ this -> sfa [ $ i ] , $ i , $ this ) ; } return new static ( $ sfa ) ; }
Map elements to a new ImmArray via a callback

@param callable $cb Function to map new data
@return static
Map elements to a new ImmArray via a callback