public function map(callable $fn) : self
    {
        $validate = $fn instanceof Closure;

        $b = [];

        foreach ($this->a as $row) {
            $b[] = array_map($fn, $row);
        }

        return new self($b, $validate);
    }
public function map(callable $fn) : self
    {
        $validate = $fn instanceof Closure;

        $b = [];

        foreach ($this->a as $row) {
            $b[] = array_map($fn, $row);
        }

        return new self($b, $validate);
    }
public function map ( callable $ fn ) : self { $ validate = $ fn instanceof Closure ; $ b = [ ] ; foreach ( $ this -> a as $ row ) { $ b [ ] = array_map ( $ fn , $ row ) ; } return new self ( $ b , $ validate ) ; }
Run a function over all of the elements in the matrix.

@param callable $fn
@return self
Run a function over all of the elements in the matrix .