public function children() : Generator
    {
        if ($this->left) {
            yield $this->left;
        }
        
        if ($this->right) {
            yield $this->right;
        }
    }
public function children() : Generator
    {
        if ($this->left) {
            yield $this->left;
        }
        
        if ($this->right) {
            yield $this->right;
        }
    }
public function children ( ) : Generator { if ( $ this -> left ) { yield $ this -> left ; } if ( $ this -> right ) { yield $ this -> right ; } }
Return the children of this node in an array.

@return \Generator
Return the children of this node in an array .