Phpml\Math\Set::remove PHP Method

remove() public method

public remove ( string | integer | float $element ) : Set
$element string | integer | float
return Set
    public function remove($element) : Set
    {
        return $this->removeAll([$element]);
    }

Usage Example

Example #1
0
 public function testRemove()
 {
     $set = new Set(['B', 'A', 2, 1]);
     $this->assertEquals((new Set([1, 2, 2, 2, 'B']))->toArray(), $set->remove('A')->toArray());
 }