public function map(\closure $mapFunction)
    {
        $newInstance = new self();
        $newInstance->setArray(array_map($mapFunction, $this->array));
        return $newInstance;
    }
public function map(\closure $mapFunction)
    {
        $newInstance = new self();
        $newInstance->setArray(array_map($mapFunction, $this->array));
        return $newInstance;
    }
public function map ( \ closure $ mapFunction ) { $ newInstance = new self ( ) ; $ newInstance -> setArray ( array_map ( $ mapFunction , $ this -> array ) ) ; return $ newInstance ; }
returns a new ArrayList containing all the elements of this ArrayList after applying the callback function to each one.
@param \closure $mapFunction
@return ArrayListInterface|ArrayListTrait
returns a new ArrayList containing all the elements of this ArrayList after applying the callback function to each one .