Created
January 23, 2016 03:24
-
-
Save colindecarlo/10ff0e2ebece6d0b1653 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Numberset | |
{ | |
// class definition | |
public function odd() | |
{ | |
$mutant = new static($this->min, $this->max); | |
$mutant->numbers = array_filter($this->numbers, function ($number) { | |
return $number % 2; | |
}); | |
return $mutant; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment